Localization and multilingual content

LocalizationCiteRef::def:localization and the capability of supporting multilingual environmentsCiteRef::gh:smw:594 using Semantic MediaWiki has been improved in the and more or less finalized in the CiteRef::gh:smw:594:264713467 release.

Preface
Supporting multilingual content in Semantic MediaWiki is based on a view that a content page is assumed to be related to one specific content language with similar content in a different language linking to each other (by means of a semantic relation not through a simple literal declaration).

Whether the expressed conceptional framework is to be an acceptable practice or not will be left to users to decide but Semantic MediaWiki is capable of supporting multilingual content scenarios to the degree outlined.

Technical exposition
Efforts were made in getting global assumptions about a user and content language removed from internal data providers to enable formatting of values in terms of an explicit language (which can be either user or content oriented).

The introduction of allows Semantic MediaWiki to store text segments in tandem to a specific language and is used by:
 * Property descriptions as property to create annotations to provide a localized descriptions of a property (this is so users can have a clear concept of what a property is to represent and helps its correct application). For example, dwc:kingdom shows its description in the selected user language, if available.

Multilingual content
In the past, the only way to achieve a multilingual wiki was by splitting it on a per language basis and loosely interconnect content via interwikilinks. While this may work for large installations, it seems unreasonable for maintainers of smaller sites to apply the same concept.

A general obstacle to provide localisable content is and was that the content language (or site language) is global and determines the rules of how content is to be interpret editorially (e.g. separators  vs.   on numbers, fonts, ltr vs. rtl etc.).

as an extension used in connection with Semantic MediaWiki can help mitigate the limitation by allowing pages to "semantically" link to each other not only by means of so called interwikilinks but also to declare a specific page content language. By having the global content language no longer taking precedence over the content of a particular page (the page content language can be entirely different from that of the global content language) it has more editorial leverage to apply different rules.

The concept of an individual page content language is important because each page (and hereby its content) can declare a dependency in terms of a selected language (and its rules). For example, a page that says it is in French can create annotations using those rules with users keeping the writing style of the denoted content language.

The sandbox demonstrates this concept more clearly with the site language set to be French (which would require all numeric annotations to carry  as decimal separator), pages (e.g. Berlin) denoting its own page content language are no longer restricted to a "French" content interpretation.

Interlanguagelinks and content language annotations
When using (e.g.  ) to interlink pages (linked to each other that refer to the same   as ) and explicitly denoting   as language, content will be given expository freedom over the editorial preference.

As of, Semantic MediaWiki understands that the page content language takes antecedence over the global content language and in reference to the earlier example,  is now being identified as numeric decimal separator with annotations such as   to be interpret in the denoted language instead of the global one (which is French).

Localization
Not only is it important to support multilingual content from an editorial perspective, another significant factor in providing a better reading experience is its localization. Here as well were some improvements made so that when a user chooses a specific user language the formatting of query results (where allowed and possible) are to be available in a localized version.


 * display formatter was added as output format option to signal to a value that its display properties are to be in a localized context.
 * and have been made aware of a user context and if available will show localized values.

Examples

 * Localization of numeric and quantity values CiteRef::sb:smw:1591
 * Localization of boolean values CiteRef::sb:smw:1580
 * Localization of date values CiteRef::sb:smw:1533:0
 * Hint property usage with descriptions in different languages using CiteRef::sb:smw:1533:1
 * Berlin CiteRef::sb:smw:berlin:pcl is to showcase the influence of the page content language and specifically the parsing of numbers
 * Help:Import vocabulary and Help:词表导入 demonstrate how similar content in different languages can be linked together using (contains additional examples).