概要
ここでは、どのようにして language bar(画面上部の言語選択のリンク) を、オリジナルページと翻訳ページに追加するかを記述します。 language bar によって、サーチエンジンによって英語のページへ訪れた場合でも、選択可能な言語がすぐに分かります。
テンプレートはTemplates are ページのメンテナンスused to reduce maintenance if a page gets a new translation. 翻訳されたページは、テンプレートを追加するだけで全ての(テンプレートを利用して翻訳された)ページに The translated page only needs to be added to the template and it will be available on all (translated) pages that use the template.
以下に、Lazarus DB Faqページに language bar を追加する例を示します。
language bar の追加
ここでは、language bar を Lazarus DB Faq ページに追加する方法を説明します。
- 編集ページに入り、ページの頭に、"{{Lazarus DB Faq}}"を記述します。これは、テンプレートページへのリンクを追加することになります。
- ページを保存します。
- 再び編集ページへ行くと、下の方に "Templates used on this page: Template:Lazarus DB Faq" と書かれたテキストと、 (non-existing) template page へのリンクが見えます。次に、そのリンクをクリックし、テンプレートページの編集を開始して下さい。
- Add the following content to the template page.
<small>
[[Lazarus DB Faq/de|'''Deutsch (de)''']]
[[Lazarus DB Faq | '''English (en)''']]
</small>
- Add an entry for each translation. See for names the Main Page template, because that probably has the most translations.
- Save the template page.
- Now go to each translated page (in this case Lazarus DB Faq/de) and add {{Lazarus DB Faq}} to the top of the page.
language bar の更新
テンプレートページを編集することで、新しい言語が追加されました。
- 新しい言語のページへGo the edit tab of a page that has a new translation.
- On the edit page you find a link to the used template. Click on it, to show it.
- Edit the template page and add a link to the new translation.