书写体系

This page is a translated version of the page Writing systems and the translation is 27% complete.
i18n文档

本页为写作体系提供多方面的基本信息:多种语言手写本、写作方向、前沿翻译以及输入。

多种文字,多种方言

许多语言都用多种文字书写。 通常这是可以实现的,但缺乏软件支持,而且有时候如果不能实施,情况将变得非常复杂。 一些语言有用于支持多套书写系统的LanguageConverter。

Some languages have very similar dialects that are written in the same script(s) and can—on a technical level—be treated in the same way as different scripts.

LanguageConverter

關於如何使用LanguageConverter的文件,請參考书写系统/语法

LanguageConverter (LC) is a system based on language variants that automatically converts the content of a page into a different variant. A variant is mostly the same language in a different script. To use the LanguageConverter, go to your Internationalisation preferences. If you are on a wiki that supports conversion, you'll see an extra option for choosing the script.

Phab:T21044 -- this needs more documentation!

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

  • 克里米亚鞑靼语 (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)
  • 库尔德语 (ku): Latin (ku-latn), Arabic (ku-arab) [1.11+]
  • 希尔哈语 (shi): Tifinagh (shi-tfng), Latin (shi-latn) [1.19+]
  • 塞尔维亚语 (sr): Cyrillic (sr-ec), Latin (sr-el)
  • 塔吉克语 (tg): Cyrillic (tg-cyrl), Latin (tg-latn)
  • 乌兹别克语 (uz): Cyrillic (uz-cyrl), Latin (uz-latin) [1.20+]
  • 中文 (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!

Language code tags for scripts should follow the ISO 15924 standard.

A current limitation of this system is that it may be particularly bad at dealing with multiple writing systems based on the same underlying script. 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.

支援本配置

The wgULS/wgUVS functions in zhwp's sitelib allows for easy variant selection in userscript UIs. This can help scriptwriters produce a variant-aware interface for users. 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. 您可以在您自己的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.


參見

书写方向

许多书写系统的字符从左往右写(LTR),行文自上而下(TtB)。

A few common scripts (Arabic and Hebrew in particular) write characters right-to-left (RTL) -- see directionality support for more details on how we handle right-to-left and mixed bidirectional text with HTML output and CSS styles.

Note that an individual language can be used with scripts that have different directionalities, such as Kazakh and Kurdish which support Latin and Arabic variants.

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]

字体渲染与输入

Many scripts do not have proper fonts easily available to users. This may be because operating systems do not ship these fonts, or users don't know how to install them or don't have enough permissions to do this. The 通用語言選擇器 extension tries to solve this by embedding the fonts in the wiki itself. Fonts will be served from the server and the user's system would not need to have the fonts installed.

UniversalLanguageSelector adds support to be able to type a certain script, so users do not have to rely on external tools or support on their systems.

References

  1. Taiwan and Hong Kong are two major variants written in the same Traditional script with significant differences in phrase usage due to market separation and influence from local zho languages, so you likely want to at least keep CN, TW, and HK in your list of variants. 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