Language Macro

Version 48.1 by Simon Urli on 2026/02/02 15:21
Warning
For security reasons, the document is displayed in restricted mode as it is not the current version. There may be differences and errors due to this.

Example

Code

{{language codes='de, fr, it, lv, nl, ru, sv, zh'/}}

Result

Parameters

 Parameter name  Description
 codes  indicates the code list for the language

Codes that can be used:
Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed in [xwiki:Macros.Language]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.

References

The locale code is based on <ISO 639-1 language code>_<COUNTRY UPPER CASE>

The flag need to be attachmed and the filename needs to be <locale>.png (for example pt_BR.png). All the flags currently attached comes from http://www.famfamfam.com/lab/icons/flags/.

Information

Since famfamfam.com seems to be down now, the zip containing all flags coming from this website has been retrieved from internet archive and added as attachment here for future needs.

The display name needs to be added in the XWiki.WikiMacroClass object.

Get Connected