Template:LangSwitch: Difference between revisions
Content deleted Content added
m add fallbacks for variants "nb" and "nn" of Norwegian "no" |
m more fallbacks for mg, and variants of: gan, iu, kk, ku, tg, uz, zh, |
||
Line 9: | Line 9: | ||
* Beware to the number of closing braces on the line after the default/en line: two braces per line defining a fallback language above it. |
* Beware to the number of closing braces on the line after the default/en line: two braces per line defining a fallback language above it. |
||
* All language codes mapped in this switch MUST be normalized to lowercase. |
* All language codes mapped in this switch MUST be normalized to lowercase. |
||
* Variants of the following languages (with a suffix) should be handled: gan, iu, kk, ku, sr, tg, uz, zh. TODO: shi. |
|||
FIXME: there are language codes for vernacular variants of Arabic to add here |
FIXME: there are language codes for vernacular variants of Arabic to add here |
||
Line 80: | Line 81: | ||
}}<!-- |
}}<!-- |
||
fr -->|br|fr|fr-be|fr-ca|fr-ch|fr-lu|gcf|gsw-fr|ht|oc|pcd|ty|wa= |
fr -->|br|fr|fr-be|fr-ca|fr-ch|fr-lu|gcf|gsw-fr|ht|mg|oc|pcd|ty|wa= |
||
{{#ifeq:{{{fr|}}}|{{{fr|-}}}|{{{fr|}}}| |
{{#ifeq:{{{fr|}}}|{{{fr|-}}}|{{{fr|}}}| |
||
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
||
Line 172: | Line 173: | ||
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
||
}}}}}}}}<!-- |
}}}}}}}}<!-- |
||
iu-cans < iu -->|iu-latn= |
|||
{{#ifeq:{{{iu|}}}|{{{iu|-}}}|{{{iu|}}}| |
|||
{{#ifeq:{{{iu-cans|}}}|{{{iu-cans|-}}}|{{{iu-cans|}}}| |
|||
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
|||
}}}}<!-- |
|||
iu-latn < iu-cans -->|iu= |
|||
{{#ifeq:{{{iu-cans|}}}|{{{iu-cans|-}}}|{{{iu-cans|}}}| |
|||
{{#ifeq:{{{iu-latn|}}}|{{{iu-latn|-}}}|{{{iu-latn|}}}| |
|||
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
|||
}}}}<!-- |
|||
iu-latn < iu -->|iu-cans= |
|||
{{#ifeq:{{{iu|}}}|{{{iu|-}}}|{{{iu|}}}| |
|||
{{#ifeq:{{{iu-latn|}}}|{{{iu-latn|-}}}|{{{iu-latn|}}}| |
|||
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
|||
}}}}<!-- |
|||
ks-arab < ks -->|ks-deva= |
ks-arab < ks -->|ks-deva= |
||
Line 190: | Line 208: | ||
}}}}<!-- |
}}}}<!-- |
||
ku -->|ku- |
ku-arab < ku -->|ku-latn= |
||
{{#ifeq:{{{ku|}}}|{{{ku|-}}}|{{{ku|}}}| |
{{#ifeq:{{{ku|}}}|{{{ku|-}}}|{{{ku|}}}| |
||
{{#ifeq:{{{ku-arab|}}}|{{{ku-arab|-}}}|{{{ku-arab|}}}| |
|||
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
||
}}<!-- |
}}}}<!-- |
||
ku-arab < ku-latn -->|ku= |
|||
{{#ifeq:{{{ku-latn|}}}|{{{ku-latn|-}}}|{{{ku-latn|}}}| |
|||
{{#ifeq:{{{ku-arab|}}}|{{{ku-arab|-}}}|{{{ku-arab|}}}| |
|||
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
|||
}}}}<!-- |
|||
ku-latn < ku -->|ku-arab= |
|||
{{#ifeq:{{{ku|}}}|{{{ku|-}}}|{{{ku|}}}| |
|||
{{#ifeq:{{{ku-latn|}}}|{{{ku-latn|-}}}|{{{ku-latn|}}}| |
|||
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
|||
}}}}<!-- |
|||
nl -->|li|vls= |
nl -->|li|vls= |
||
Line 245: | Line 275: | ||
{{#ifeq:{{{pt-cv|}}}|{{{pt-cv|-}}}|{{{pt-cv|}}}| |
{{#ifeq:{{{pt-cv|}}}|{{{pt-cv|-}}}|{{{pt-cv|}}}| |
||
{{#ifeq:{{{pt-pt|}}}|{{{pt-pt|-}}}|{{{pt-pt|}}}| |
{{#ifeq:{{{pt-pt|}}}|{{{pt-pt|-}}}|{{{pt-pt|}}}| |
||
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
|||
}}}}}}<!-- |
|||
ru < kk-arab < kk-cyrl < kk -->|kk-latn= |
|||
{{#ifeq:{{{kk|}}}|{{{kk|-}}}|{{{kk|}}}| |
|||
{{#ifeq:{{{kk-cyrl|}}}|{{{kk-cyrl|-}}}|{{{kk-cyrl|}}}| |
|||
{{#ifeq:{{{kk-arab|}}}|{{{kk-arab|-}}}|{{{kk-arab|}}}| |
|||
{{#ifeq:{{{ru|}}}|{{{ru|-}}}|{{{ru|}}}| |
|||
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
|||
}}}}}}}}<!-- |
|||
ru < kk-arab < kk-cyrl < kk-latn -->|kk= |
|||
{{#ifeq:{{{kk-latn|}}}|{{{kk-latn|-}}}|{{{kk-latn|}}}| |
|||
{{#ifeq:{{{kk-cyrl|}}}|{{{kk-cyrl|-}}}|{{{kk-cyrl|}}}| |
|||
{{#ifeq:{{{kk-arab|}}}|{{{kk-arab|-}}}|{{{kk-arab|}}}| |
|||
{{#ifeq:{{{ru|}}}|{{{ru|-}}}|{{{ru|}}}| |
|||
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
|||
}}}}}}}}<!-- |
|||
ru < kk-arab < kk-latn < kk -->|kk-cyrl= |
|||
{{#ifeq:{{{kk|}}}|{{{kk|-}}}|{{{kk|}}}| |
|||
{{#ifeq:{{{kk-latn|}}}|{{{kk-latn|-}}}|{{{kk-latn|}}}| |
|||
{{#ifeq:{{{kk-arab|}}}|{{{kk-arab|-}}}|{{{kk-arab|}}}| |
|||
{{#ifeq:{{{ru|}}}|{{{ru|-}}}|{{{ru|}}}| |
|||
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
|||
}}}}}}}}<!-- |
|||
ru < kk-cyrl < kk-latn < kk -->|kk-arab= |
|||
{{#ifeq:{{{kk|}}}|{{{kk|-}}}|{{{kk|}}}| |
|||
{{#ifeq:{{{kk-latn|}}}|{{{kk-latn|-}}}|{{{kk-latn|}}}| |
|||
{{#ifeq:{{{kk-cyrl|}}}|{{{kk-cyrl|-}}}|{{{kk-cyrl|}}}| |
|||
{{#ifeq:{{{ru|}}}|{{{ru|-}}}|{{{ru|}}}| |
|||
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
|||
}}}}}}}}<!-- |
|||
ru < tg-cyrl < tg -->|tg-latn= |
|||
{{#ifeq:{{{tg|}}}|{{{tg|-}}}|{{{tg|}}}| |
|||
{{#ifeq:{{{tg-cyrl|}}}|{{{tg-cyrl|-}}}|{{{tg-cyrl|}}}| |
|||
{{#ifeq:{{{ru|}}}|{{{ru|-}}}|{{{ru|}}}| |
|||
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
|||
}}}}}}<!-- |
|||
ru < tg-cyrl < tg-latn -->|tg= |
|||
{{#ifeq:{{{tg-latn|}}}|{{{tg-latn|-}}}|{{{tg-latn|}}}| |
|||
{{#ifeq:{{{tg-cyrl|}}}|{{{tg-cyrl|-}}}|{{{tg-cyrl|}}}| |
|||
{{#ifeq:{{{ru|}}}|{{{ru|-}}}|{{{ru|}}}| |
|||
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
|||
}}}}}}<!-- |
|||
ru < tg-latn < tg -->|tg-cyrl= |
|||
{{#ifeq:{{{tg|}}}|{{{tg|-}}}|{{{tg|}}}| |
|||
{{#ifeq:{{{tg-latn|}}}|{{{tg-latn|-}}}|{{{tg-latn|}}}| |
|||
{{#ifeq:{{{ru|}}}|{{{ru|-}}}|{{{ru|}}}| |
|||
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
||
}}}}}}<!-- |
}}}}}}<!-- |
||
Line 302: | Line 379: | ||
}}<!-- |
}}<!-- |
||
zh-hans < zh -->|zh-hant |
zh-hans < zh -->|zh-hant= |
||
{{#ifeq:{{{zh|}}}|{{{zh|-}}}|{{{zh|}}}| |
{{#ifeq:{{{zh|}}}|{{{zh|-}}}|{{{zh|}}}| |
||
{{#ifeq:{{{zh-hans|}}}|{{{zh-hans|-}}}|{{{zh-hans|}}}| |
{{#ifeq:{{{zh-hans|}}}|{{{zh-hans|-}}}|{{{zh-hans|}}}| |
||
Line 339: | Line 416: | ||
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
||
}}}}}}}}}}<!-- |
}}}}}}}}}}<!-- |
||
zh-hans < zh < zh-hant -->|zh-hk|zh-mo|zh-tw= |
|||
{{#ifeq:{{{zh-hant|}}}|{{{zh-hant|-}}}|{{{zh-hant|}}}| |
|||
{{#ifeq:{{{zh|}}}|{{{zh|-}}}|{{{zh|}}}| |
|||
{{#ifeq:{{{zh-hans|}}}|{{{zh-hans|-}}}|{{{zh-hans|}}}| |
|||
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
|||
}}}}}}<!-- |
|||
zh-hans < zh < zh-hant < lzh -->|zh-classical= |
|||
{{#ifeq:{{{lzh|}}}|{{{lzh|-}}}|{{{lzh|}}}| |
|||
{{#ifeq:{{{zh-hant|}}}|{{{zh-hant|-}}}|{{{zh-hant|}}}| |
|||
{{#ifeq:{{{zh|}}}|{{{zh|-}}}|{{{zh|}}}| |
|||
{{#ifeq:{{{zh-hans|}}}|{{{zh-hans|-}}}|{{{zh-hans|}}}| |
|||
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
|||
}}}}}}}}<!-- |
|||
zh-hans < zh < zh-hant < zh-classical -->|lzh= |
|||
{{#ifeq:{{{zh-classical|}}}|{{{zh-classical|-}}}|{{{zh-classical|}}}| |
|||
{{#ifeq:{{{zh-hant|}}}|{{{zh-hant|-}}}|{{{zh-hant|}}}| |
|||
{{#ifeq:{{{zh|}}}|{{{zh|-}}}|{{{zh|}}}| |
|||
{{#ifeq:{{{zh-hans|}}}|{{{zh-hans|-}}}|{{{zh-hans|}}}| |
|||
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
|||
}}}}}}}}<!-- |
|||
zh-hant < zh --> |
zh-hant < zh -->|zh-hans= |
||
{{#ifeq:{{{zh|}}}|{{{zh|-}}}|{{{zh|}}}| |
{{#ifeq:{{{zh|}}}|{{{zh|-}}}|{{{zh|}}}| |
||
{{#ifeq:{{{zh-hant|}}}|{{{zh-hant|-}}}|{{{zh-hant|}}}| |
{{#ifeq:{{{zh-hant|}}}|{{{zh-hant|-}}}|{{{zh-hant|}}}| |
||
Line 350: | Line 447: | ||
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
||
}}}}<!-- |
}}}}<!-- |
||
zh-hant < zh-hans < zh -->|zh-cn|zh-my|zh-sg= |
|||
{{#ifeq:{{{zh|}}}|{{{zh|-}}}|{{{zh|}}}| |
|||
{{#ifeq:{{{zh-hans|}}}|{{{zh-hans|-}}}|{{{zh-hans|}}}| |
|||
{{#ifeq:{{{zh-hant|}}}|{{{zh-hant|-}}}|{{{zh-hant|}}}| |
|||
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}} |
|||
}}}}}}<!-- |
|||
All other languages will fallback to "default" then "en". |
All other languages will fallback to "default" then "en". |
Revision as of 11:17, 27 January 2014
{{{en}}}
This template has a duplicate on Meta-Wiki. Please visit its documentation on Meta-Wiki for usage details and any additional information. Please keep the content and translations synchronized as much as possible. Thank you! |