Recent Topics

[3.3.1-dev] not allowed suffix in Locale Field

started by on Jul 20, 2009 – Last touched: Jul 20, 2009

Jul 20, 2009 15:17    

Regional -> Edit a lang

In the locale field: there shouldn't be a suffix -utf8

Rationale: the "Locale field" is used as the value of "lang=" in all pages.

Thus a locale field with the value "en-US-utf8" is illegal.

For more info: http://laibcoms.asia/blog/labox/general5/the-language-attribute
Or visit: http://www.w3.org/International/articles/language-tags/

In short what's allowed in the "lang=" attribute:
[list]

  • en = Generic English
  • en-US = US English
  • en-GB = Great Britain English
  • en-PH = Philippine English
  • fil = Filipino language
  • fil-Tglg = Filipino language written in Baybayin/Moro script
  • bik-bto = Bikolano language of the Iriga dialect
  • bik-bto-Tglg = Bikolano language of the Iriga dialect written in Baybayin/Moro script
  • phi-Tglg-mrw = Maranao Philippine Language written in Baybayin/Moro script
  • [/list:u]

    Legal format: language-script-region-variant-extension-privateuse

    And so on.

    This makes the language "English (US) utf8" wrong because it has a "Locale field" value of "en-US-utf8".

    Official Centralized Lang Subtag Registry: http://www.iana.org/assignments/language-subtag-registry
    Official Centralized Macrolanguage subtag list: http://www.sil.org/iso639-3/macrolanguages.asp

    ^_^

    A solution if suffixing -utf8 is needed, separate the two functions.
    Ie
    Create a new field or something for the "lang=" attribute value.
    While another field for the -utf8 suffixes.

    Normally it shouldn't be a problem at all, but we can not control browsers. There is a risk that current or future browsers may change the way they read illegal "lang=" attribute values. The specification wasn't clear, it simply said that it is at the browser's hand to just drop illegal suffixes or they can opt to ignore the whole value of that lang attribute!! (They should stop writing specifications that doesn't define such cases.)


    Form is loading...

    powered by b2evolution free blog software – This forum is powered by b2evolution CMS, a complete engine for your website.