文字体系

This page is a translated version of the page Writing systems and the translation is 51% complete.
国際化の説明文書

このページでは、複数の表記体系で書かれた言語、書字方向、フォントの描画と入力など、文字体系のさまざまな側面への対応について基本的な情報を提供します。

複数の文字体系、複数の方言

多くの言語は、複数の表記体系で表記されます。 多くの場合、これは可能ですが、ソフトウェアでのサポートが不足しており、不可能ではないにしろ、実装が困難な場合もあります。 いくつかの言語では、複数の表記体系へのサポートを追加されている LanguageConverter が用意されています。

言語によっては、非常によく似た方言があり、同じ文字体系で書かれているため、(技術的なレベルでは) 異なる文字体系と同じように扱われることがあります。

LanguageConverter

LanguageConverter の使用法の説明文書は、文字体系/構文 を参照してください。

LanguageConverter (LC) は、言語変種に基づくシステムであり、ページの内容を別の言語変種に自動的に変換します。 言語変種とは、ほとんど同じ言語を異なる文字体系で表記したものです。 LanguageConverter を使用するには、国際化の個人設定に移動します。 変換をサポートしているウィキでは、文字体系を選択するための追加オプションが表示されます。

Phab:T21044 -- this needs more documentation!

It is implemented for the following languages (as of July 2023; see languagesWithVariants for the latest list):

  • バリ語 (ban): Balinese (ban-bali), Latin (ban-latn) [1.36+]
  • クリミア・タタール語 (crh): Latin (crh-latn), Cyrillic (crh-cyrl)
  • 英語 (en): Normal (en), Pig Latin (en-x-piglatin) (for testing, only when $wgUsePigLatinVariant is enabled)
  • 贛語 (gan): Simplified (gan-hans), Traditional (gan-hant)
  • イヌクティトット語 (iu): Latin (ike-latn), Syllabics (ike-cans) [1.18+]
  • カザフ語 (kk): Cyrillic (kk-cyrl), Latin (kk-latn), Arabic (kk-arab) Discontinued in 2023, see reasons at phab:T268143 and phab:T350684.
  • クルド語 (ku): Latin (ku-latn), Arabic (ku-arab) [1.11+]
  • セルボ・クロアチア語 (sh): Cyrillic (sh-cyrl), Latin (sh-latn) [1.40+]
  • タシルハイト語 (shi): Tifinagh (shi-tfng), Latin (shi-latn) [1.19+]
  • セルビア語 (sr): Cyrillic (sr-ec), Latin (sr-el)
  • タジク語 (tg): Cyrillic (tg-cyrl), Latin (tg-latn)
  • タリシュ語 (tly): Cyrillic (tly-cyrl), Latin (tly-latn) [1.36+]
  • ウズベク語 (uz): Cyrillic (uz-cyrl), Latin (uz-latin) [1.20+]
  • 呉語 (wuu): Simplified (wuu-hans), Traditional (wuu-hant) [1.41+]
  • 中国語 (zh):
    • 簡体中国語 (zh-hans): China (zh-cn), Singapore (zh-sg), Malaysia (zh-my)
    • 繁体中国語 (zh-hant): Taiwan (zh-tw), Hong Kong (zh-hk),[1] Macau (zh-mo)

And it is needed for many more languages!

文字体系の言語コード タグは、ISO 15924 規格に従うべきです。 However, for legacy reasons, セルビア語 is an exception, with sr-ec instead of sr-cyrl and sr-el instead of sr-latn. This is in disscusion in phab:T117845.

このシステムの現在の限界は、同じ文字体系に基づいた複数の表記体系を扱うのが特に苦手なことでしょう。 Chinese Wikipedians occasionally use => (unidirectional) for failing cases. As LC always tries to eat up the largest chunks of words using strtr in PHP, -{}- (breaking up words) can be often useful too.

Supporting configuration

The wgULS/wgUVS functions in zhwp's sitelib (now deprecated, see zh:Wikipedia:HanAssist for the current version) allows for easy variant selection in userscript UIs. これは、スクリプトライターが利用者に対して言語変種を意識したインターフェイスを制作するのに役立ちます。 For other places unreachable by LC, {{int:Conversionname}} can be used to fetch the current UI language/variant.

The PreviewWithVariant gadget allows Wikipedians to check conversion results in the editor preview. You can configure it for your own wiki.

"Foreign language marker" templates like {{lang}} should add "disable conversion" markers -{ text }- around the quoted foreign text to avoid mis-conversion. On Hans/Hant wikipedias this becomes a concern for Japanese Kanji and Vietnamese Han Nom, while on Wikipedias with Latin text marked for conversion this concern should be immediate.

The WikitextLC module allows for easily inserting LC commands to Lua output. The NoteTA and CGroup system allow for accessing pre-defined sets of subject-specific conversions. Module:地区用词 allows for an adaptive output of the form "foo, known in PLACE and PLACE as bar, and PLACE as baz".

Automated title redirection on URLs may cause apparent inconvenience for interfaces without this feature. See T49725 for the Lua task and T160952 for the section-anchor task.

URL Redirection

In some installations of MediaWiki, a short URL is employed. For example, in Chinese Wikipedia, instead of https://zh.wikipedia.org/wiki/维基百科 (if no variant is specified) or https://zh.wikipedia.org/w/index.php?title=维基百科&variant=zh-cn (if the variant is specified without rewrite rules), a shortened URL such as https://zh.wikipedia.org/zh-cn/维基百科 can be used as a temporary link to the specified script variant (zh-cn in this case).

This behaviour can be seen several language Wikipedia such as Chinese Wikipedia, Serbian Wikipedia, etc. However, others like Gan Chinese Wikipedia and Balinese Wikipedia often keeps the long url with index.php&variant=.

This is controlled by $wgVariantArticlePath and web server rewrite rules (see manuals for short URL in Apache and nginx ).

関連項目

書字方向

Most writing systems operate as characters written left-to-right (LTR), with lines stacked from top-to-bottom (TtB).

いくつかの共通の文字体系 (特にアラビア語とヘブライ語) は、文字を右から左に書きます (右横書き、RTL)。HTML 出力と CSS スタイルで右横書き (RTL) と両方向のテキストをどのように扱うかの詳細は、directionality support を参照してください。

注意事項として、単一言語で異なる書字方向を用いる例があり、カザフ語とクルド語ではラテン語 (右横書き) とアラビア語 (左横書き) のつづり方を使います。

Note also that the World Wide Web Consortium has defined more directionalities for the use in web pages, such as North East Asian top-to-bottom ones, with lines stacked either from left to right or right to left.[2]

フォントの表示と入力

多くの表記体系では、利用者が簡単に利用できる適切なフォントがありません。 理由はOSにそのようなフォントが同梱されていない、あるいは利用者がフォントのインストール方法を知らない、もしくは権限がない場合が考えられます。 ウィキ自体にフォントを埋め込み、問題を解決しようとするのがUniversalLanguageSelector 拡張機能です。 サーバから供給するため、フォントを利用者のシステムにインストールする必要がありません。

ユニバーサル言語選択は、特定の表記体系で入力できるようにするサポートを追加し、利用者が外部ツールやシステム上のサポートに依存する必要がないようにします。

脚注

  1. 台湾と香港は同じ繁体字で書かれた 2 つの大きな言語変種ですが、市場の分離やローカルの zho 言語の影響により、言い回しに大きな違いがあるため、少なくとも CN、TW、HK は言語変種一覧に入れておくといいでしょう。 If you insist on flattening the scope of Chinese variants to a script-based Simp/Trad separation, follow what the reporter did in phab:T149278.
  2. CSS Writing Modes Level 3