I just pulled this out of my, now rather outdated, Multi-Lingual Publishing (MLP) Pack for Textpattern CMS.
Edited by netcarver, 13 March 2012 - 05:30 PM.
Posted 13 March 2012 - 02:36 PM
Edited by netcarver, 13 March 2012 - 05:30 PM.
Posted 14 March 2012 - 09:12 AM
Posted 14 March 2012 - 04:48 PM
We've kind of skipped over the issue of language names in PW, and are letting people use whatever names they want for their languages (whether iso/codes, names, or something else). Though the <html> lang attribute, and PHP setlocale() codes are set with the translation files. But the intention here was just to broaden the utility of the language capabilities. For instance...
I've not done anything with regard to right-to-left languages, and don't have a good understanding of what is necessary to support them. The question has come up before. What is your experience in supporting these languages? I'm curious what steps we would need to take (if any?) to properly support them.
Posted 16 March 2012 - 09:09 AM
For example, most browsers will submit an Accept-Language request header using 2 character codes. Server side you can pull these codes out of the headers and use them to auto-select the correct (or best) language for your visitor's browser and fall back on a site-wide default as a last resort.
You can apply this markup to multiple page elements as required and even nest them. So if you had an English document which quoted some RTL language like Urdu (ur) then you could do something like <body lang="en" dir="ltr"> and then mark all the block quotes with lang="ur" dir="rtl".
Posted 16 March 2012 - 12:37 PM
I think for the sites that adopt flags, they do it because it's pretty, looks international, and can catch the eye quicker. Also, maybe there isn't a technical 1-to-1 relationship among many, but the communication is still there (though I'm sure there are exceptions).
For something that involves a very large number of languages, then I agree flags lead to inaccurate generalizations. But when I go to a site in another language, I see the US or British flag a lot quicker than I see the word "English", so I tend to have a slight usability preference for the flags (as a user). Even if they aren't perfect, they are a familiar landmark in a sea of unfamiliar language where it's easier to spot landmarks than words. For me the worst cases are when sites use language names in a dropdown selection, and the label on the dropown is not one that I can read to even know what it's for.
I'm a little afraid of this just from an SEO standpoint. This clearly violates Google's webmaster guidelines (delivering different textual content at the same URL based on client-side factors), but maybe they have an exception for a case like this? (at least that would make sense)
It sounds like RTL support has more to do with the markup than anything else? Are you aware of any factors on the data storage side?
$out = "abcdefg"; echo '<div dir="ltr">' . $out . '</div>'; echo '<div dir="rtl">' . $out . '</div>';
abcdefg
Edited by netcarver, 17 March 2012 - 05:33 PM.
Posted 17 March 2012 - 08:34 AM
Posted 17 March 2012 - 05:15 PM
Posted 18 March 2012 - 08:31 AM
Posted 18 March 2012 - 08:47 AM
Great info and tests, thanks Netcarver! I'm thinking RTL support should come pretty easily for ProcessWire. One person had asked about Hebrew awhile back, but I didn't know enough at the time to provide a good answer. Now I do. It sounds like you are a VIM user too?
0 members, 0 guests, 0 anonymous users