Actions

Difference between revisions of "Mahara日本語ドキュメント/カスタマイズ/言語ストリング"

From Mahara Wiki

< Mahara日本語ドキュメント‎ | カスタマイズ
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
作成中です - [[User:Mits|mits]]
 
 
 
Mahara 1.2以降、管理者は修正 (または新しい) 言語ファイルをlocal/langディレクトリに入れることができるようになりました。これらのファイルのストリングはインストール済み言語パックのストリングに優先 (override) されます。
 
Mahara 1.2以降、管理者は修正 (または新しい) 言語ファイルをlocal/langディレクトリに入れることができるようになりました。これらのファイルのストリングはインストール済み言語パックのストリングに優先 (override) されます。
  
For example, say you want to change the string "Logout" to "Let me out!".  This string is defined in htdocs/lang/en.utf8/mahara.php.  You can create the file htdocs/local/lang/en.utf8/mahara.php with the following contents:
+
例えば、あなたがストリング「ログアウト」を「私を外に出してください!」と変更したい場合を考えてみましょう。このストリングは「htdocs/lang/en.utf8/mahara.php」内で定義されています。あなたは次のコンテンツを含んだファイル「htdocs/local/lang/en.utf8/mahara.php」を作成することができます:
  
 
  <?php
 
  <?php
 
   
 
   
  $string['logout'] = "Let me out!";
+
  $string['logout'] = "私を外に出してください!";
 +
 
 +
オリジナルの言語ファイルを編集する必要がないため、サイトを新しいバージョンのMaharaにバージョンアップしやすくなります。ローカルで変更した言語ファイルを更新バージョンにマージする必要もありません。
  
There is no need to edit the original language files, so updating the site to newer versions of Mahara will be easier -- there is no need to merge local changes to the language files with the updated versions.
+
プラグイン内で使用されるストリングはhtdocs/artefact/file/lang/en.utf8/artefact.file.phpのようなファイルに保存されます。これらのストリングはhtdocs/local/lang/en.utf8/artefact.file.phpを作成することで優先 (override) させることができます。
  
Strings used by plugins are stored in files like htdocs/artefact/file/lang/en.utf8/artefact.file.php.  These strings can be overridden by creating htdocs/local/lang/en.utf8/artefact.file.php.
 
 
[[Category:カスタマイズ]]
 
[[Category:カスタマイズ]]

Latest revision as of 05:25, 9 August 2011

Mahara 1.2以降、管理者は修正 (または新しい) 言語ファイルをlocal/langディレクトリに入れることができるようになりました。これらのファイルのストリングはインストール済み言語パックのストリングに優先 (override) されます。

例えば、あなたがストリング「ログアウト」を「私を外に出してください!」と変更したい場合を考えてみましょう。このストリングは「htdocs/lang/en.utf8/mahara.php」内で定義されています。あなたは次のコンテンツを含んだファイル「htdocs/local/lang/en.utf8/mahara.php」を作成することができます:

<?php

$string['logout'] = "私を外に出してください!";

オリジナルの言語ファイルを編集する必要がないため、サイトを新しいバージョンのMaharaにバージョンアップしやすくなります。ローカルで変更した言語ファイルを更新バージョンにマージする必要もありません。

プラグイン内で使用されるストリングはhtdocs/artefact/file/lang/en.utf8/artefact.file.phpのようなファイルに保存されます。これらのストリングはhtdocs/local/lang/en.utf8/artefact.file.phpを作成することで優先 (override) させることができます。