: Language prefixes Based on other discussions on this site and elsewhere, using flags to identify languages is the path to madness. Nevertheless, I need an easy way to identify the language of
Based on other discussions on this site and elsewhere, using flags to identify languages is the path to madness.
Nevertheless, I need an easy way to identify the language of individual content items on my site. I was thinking a bracketed 3 letter prefix might do the trick:
[ENG] - English
[FRE] - French
[FRA] - French (better?)
[ITA] - Italian
[SPA] - Spanish
[ESP] - Spanish (better?)
[GER] - German
[JPN] - Japanese
[CHN-S] - Chinese Simplified
[CHN-T] - Chinese Traditional
etc...
Apart from the special case for Chinese's two distinct systems, would I run into any problems sticking to a 3 character prefix system?
More posts by @Shelley277
3 Comments
Sorted by latest first Latest Oldest Best
I don't think reinventing the wheel is the right path.
There are a lot of standards currently on use. I think if you wanna markup your elements correctly, start from the basis: there is a global HTML attribute named lang for this purpose.
<html lang='de-de'>
<html lang='en-us'>
...
for an element only
<html lang='pt-br'>
...
<p>Também chamado de <abbr lang='en-us' title='Search Engine Optimization'>SEO</abbr>...</p>
...
Follow some references for your convenience:
www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#attr-lang http://www.ietf.org/rfc/bcp/bcp47.txt en.wikipedia.org/wiki/IETF_language_tag http://www.w3.org/International/tutorials/language-decl/
EDIT
I'm still not sure if you intend to use this in URL path, in title, or in a select lang widget.
However, I think keeping some existing convention is the safe path as most people should be used to them. Also, I think flags (countries flags) would be a good choice for a widget.
You are abbreviating language names in English, not in that language. German speakers will be looking for an abbreviation of "Deutsch", not "German". Why not use the standard two-letter abbreviations for languages?
I see no problems with this for anyone using a modern browser. You might want to add some metadata/microdata to the text though, to help browsers and search engines interpret what your codes mean. I know I saw some questions on one of the stack exchange sites about it the other day, but I can't find them at the moment.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.