Template:MyLang/doc

From OpenStreetMap Wiki
Jump to: navigation, search

This template was created to be used mainly on discussion pages and user pages. OpenStreetMap is an international project in which the predominant communication within the community takes place in English. Users who have to make a laborious translation of their statements for participation in discussions (e. g. by means of a dictionary or online translator) sometimes achieve a statement that does not contain the desired wording. In order to not only publish the English statement, this template was developed. This template allows the user to integrate the actual text in his or her own native language into the text in a space-saving way. Read in German.

Usage

  • {{MyLang|language-code|statement}}

Examples

  • {{MyLang|en|Hello World!}} {{MyLang|de|Hallo Welt!}} {{MyLang|ru|привет мир!}} gives:
Hello World! Read in German. Read in Russian.

No additional markup is generated if the indicated target language is the same as on the current page (as detected by {{Langcode}}).

Caveat

If there are some HTML markup in the sentence (notably links) or some characters (like quotes), it cannot be rendered as a tooltip when hovered with mouse, because the sentence cannot be embedded in a HTML title="" attribute. An alternate rendering is then used:

  • Hello [[World]]! {{MyLang|de|Hallo "[[DE:Welt|Welt]]"!}} {{MyLang|ru|привет "мир"!}} gives:
Hello World! (de)Hallo "Welt"! (ru)привет "мир"!
  • {{MyLang|de|2=Siehe auch {{Tag|boundary|administrative}} für weitere Informationen.}} gives:
(de)Siehe auch boundary=administrative für weitere Informationen.

See also