MediaWiki talk:Lang: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Regarding the definition of the interface language)
 
mNo edit summary
Line 4: Line 4:
| user = Max34
| user = Max34
| time = 7:32, 15 Jun 2024
| time = 7:32, 15 Jun 2024
| text = Right now the site uses {{Code|<nowiki>{{uselang}}</nowiki>}} and {{Code|<nowiki>{{intlang}}</nowiki>}} templates (this is a new version of uselang) to define the interface language. This is not implemented in the best way: by checking certain interface messages for specific text. This is the only way to properly implement a language definition. This option is not ideal, since if the interface is not translated into some language, it will be impossible to determine it. There are only two options on what to do to solve this problem:
| text = Right now the site uses {{Code|preset=2|<nowiki>{{uselang}}</nowiki>}} and {{Code|preset=2|<nowiki>{{intlang}}</nowiki>}} templates (this is a new version of {{Code|preset=2|<nowiki>{{uselang}}</nowiki>}}) to define the interface language. This is not implemented in the best way: by checking certain interface messages for specific text. This is the only way to properly implement a language definition. This option is not ideal, since if the interface is not translated into some language, it will be impossible to determine it (for example '''aa''' lang). There are only two options on what to do to solve this problem:
* Create '''MediaWiki:Lang''' which will store all the language codes (MediaWiki:Lang/es = es, MediaWiki:Lang/ca = ca, MediaWiki:Lang/ru = ru, etc.), so it will be enough to enter {{Code|<nowiki>{{int:lang}}</nowiki>}} to get the interface language.
* Create '''MediaWiki:Lang''' which will store all the language codes (MediaWiki:Lang/es = es, MediaWiki:Lang/ca = ca, MediaWiki:Lang/ru = ru, etc.), so it will be enough to enter {{Code|<nowiki>{{int:lang}}</nowiki>}} to get the interface language.
* Add a mediawiki extension that adds a magic word that displays the interface language code: [[mw:Extension:UILangCode]].
* Or add a mediawiki extension that adds a magic word that displays the interface language code: [[mw:Extension:UILangCode]].
}}
}}

Revision as of 10:57, 15 June 2024

Regarding the definition of the interface language

(using Template:Message) Template:Text --Max34 (talk) 7:32, 15 Jun 2024 (UTC)