In the current version the list of languages is not translated. They probably should be.
There are 3 issues to tackle here:
1. Language names must be translated (Spanish should be español, etc.). People don;t recognize their own language expressed in English.
2. "Translate to" should be in the browser language.
3. The default language offered in the language pulldown should be the browser language.
Proposed implementation:
1. Just get a static list of language name translations, keyed by langcode into the js. (These can be obtained via the translate service I imagine; there might be other ways.)
2. Get a static list of "Translate to:" in there also. Same exact implementations. Might be in the same array.
3. Use those lists for presentation based on the current browser language.
4. Make sure that each select is presented in the current browser language (defaulting with the key from the current browser language).
Comments
Comment #0.0
rfayUpdated description and proposed fix
Comment #1
chrisarusso commentedCommitted to 6.x-1.x
Commits of 2fa731b81ec..629b45c9f4 include:
This pretty much achieves the three desired scenarios above, however, it needs another set of eyes. The submit "Translate to" button may have regressed when toggling different languages. It shows weird things every so often, but I'm not sure that this wasn't the case before. Another concern is the large size of the static js file ~56K.
Comment #2
rfayThanks for the great work on this.
I found that the jquery.translate already had excellent support for native language names; I think it was probably something I did (or he did) along the way that got it lost. Anyway, brought that back in.
I used your excellent array creator to create an array of TranslateTo and just included it as a one-liner in the js.
Committed: http://drupalcode.org/project/translatableregions.git/commitdiff/dcad6510
Comment #3
rfayCommitted in http://drupalcode.org/project/translatableregions.git/commitdiff/bf7cc3a
Comment #4.0
(not verified) commentedUpdated issue summary.