User:PerfektesChaos/js/WikiSyntaxTextMod/usage/lang
Language support for WikiSyntaxTextMod.
System requirements
editWikiSyntaxTextMod has been written to support any Wiki installation in any language in any context.
- Online (browser):
- MediaWiki 1.18 required.
- This is maintained by any WMF project.
- A local project may use MediaWiki 1.17, if providing the following definition:
mw.libs={};
- Any browser of the recent years is sufficient, e.g. supporting JavaScript 1.5.
- IE6 might be a problem, but no user of WSTM uses IE6.
- MediaWiki 1.18 required.
- Offline (local environment, bot, neither browser nor web):
- No MediaWiki is required.
- Project context is defined by API.
- A main script may import and start the WikiSyntaxTextMod modules.
Localization
editKeywords are formatted and translated as common on current project. Basically, pages and files are linked and included by the name declared in wgFormattedNamespaces
.
Import from other languages and projects
editIf page texts from other languages are used, their keywords might be regarded as similar to locals. English keywords and local project language are always supported.
Permanent import language
editIf the application object has been declared before, the following configuration setting appends languages and projects to the supported basic context:
mw.libs.WikiSyntaxTextMod.config.lang.accept = "da nn no sv";
The value is a string with one or more space separated identifiers.
If too many languages are declared, misunderstandings might be caused. Since a link to a movie or book title might start with a foreign language keyword and a colon, that one will be translated and localized. Image legends with foreign keyword will be interpreted as active parameters.
Single import from other project
editIf the page starts with the following line, the keywords in this particular wikitext will be translated once into localized format.
#WikiSyntaxTextMod IMPORT fr
(Import once from any french project.) Afterwards the line will be removed. WikiSyntaxTextMod may be triggered manually by button or portlet.
Export into other language and project
editIn user namespace, a single page may be declared to be interpreted in a different context: Other language and project settings take effect. All known keywords are translated into target language. Project identifiers are defined by wgDBname
of target.
#WikiSyntaxTextMod EXPORT itwiki
(Prepare for transfer into Italian Wikipedia.) After transferring this page into another project, WikiSyntaxTextMod will do final cleanup there.
Supported elements, languages, projects
editFirst of all namespace identifiers with technical consequences are processed. Image transclusion parameters are to be recognized and translated, but currently only a few languages are supported. Additionally any syntactical keyword in page might need translation if localized.
- Languages (more than 60)
- Known words in languages and projects
Messages
editMessages (like syntax error notification) can be translated into any language. Currently they are available in German translation only, and will fall back into English if any other user language has been defined.
[ German page ]