Hi Ulrich,
The plug-in uses get_available_languages()
( see http://queryposts.com/function/get_available_languages/) – this looks inside your site’s language directory and looks for .mo
files.
The names of the languages are determined from their code and this list: http://loc.gov/standards/iso639-2/ISO-639-2_utf-8.txt proudced by the US Congress.
The plug-in is intended primarily for developers (testing translations), but I’m sure we can add a widget. That said, the current implementation means it only affects logged-in users. For logged out users it would require storing a language cookie.
Hello,
I’ve installed the plugin. I’ve the default English language + Spanish. After installing the plugin I see the switcher menu on the top of the dashboard but, when I select Spanish nothing changes, all remain in English.
Could you please advise on this?
Thank you
Paolo
Moderator
Jan Dembowski
(@jdembowski)
Forum Moderator and Brute Squad
Please start your own topic if you need support for this plugin.
http://wordpress.org/support/plugin/wcm-user-language-switcher#postform
It really is the best way to get support for your problem.
Thread Starter
Ulrich
(@grapplerulrich)
Hi Stephen
Thank you for your reply.
As to the link for the names I see this for French so I am not sure why I am seeing “Français, Langue Française” in the dropdown.
fre|fra|fr|French|français
Look forward to an update with the widget.
Hi Ulrich,
As to the link for the names I see this for French so I am not sure why I am seeing “Français, Langue Française” in the dropdown.
Stephen already explained it:
The names of the languages are determined from their code and this list: http://loc.gov/standards/iso639-2/ISO-639-2_utf-8.txt proudced by the US Congress.
In other words: The only complete list in the world is produced by a unit in the US Congress – not by us. When you look at the break-out-project for the ISO 639-2 and the amount of languages, then you’ll realize that it’s completely impossible for us to fix and maintain the list. Not only because it’s that many strings, but as well because we both only speak some languages. Then there’s the problem that we fetch the list fresh on updates from the US Congress unit, so every update would force us to somehow prevent overwriting our customized strings. The originals serve a bibliographical purpose. Sorry, but this is something we simply can’t fix.
Thread Starter
Ulrich
(@grapplerulrich)
Hi Franz,
Sorry I didn’t explain my self well. In the list the text French is simply français.
fre|fra|fr|French|français
https://gist.github.com/grappler/5677840#file-iso-639-2_utf-8-txt-L137
This issue might be fixed when you update the list as it was last updated 4 months ago.
https://github.com/wecodemore/wcm_lang_switch/blob/master/json/lang_codes.json#L949
Thank you for your detailed answer.
Hi Ulrich,
please explain to me what ISO file you pulled out. And who is “grappler”? Oh and yes, there might be a chance that we haven’t updated the Repo in here, but already have a fix for some things on GitHub. Please give the GitHub download a shot and tell me if it fixes the issue.
Thanks.
Thread Starter
Ulrich
(@grapplerulrich)
Hi Franz,
The Iso file that I linked to was a copy that I made from the file that you linked so that I could show you the exact line as I could not link to the exact line using the file that you linked to.
So I created the gist using the file that you linked to from congress.
I used the github version and it made no difference.
Thanks
Hi Ulrich,
sorry for following up that late. Development of free software depends on the free time that we have. The same goes for free support.
About your issue: Does it still remain? Can we help you further? And would you mind heading over to GitHub? It seems that you already got an account and it would be much easier to test stuff and follow up there.
Thanks.
Thread Starter
Ulrich
(@grapplerulrich)
Hi Franz,
I understand.
How did you create a json from the text file?
I will open an issue on the GitHub repo later.
Thanks
We got a special set of developer tools for that.
Will take a look at the issue on GitHub. Stephen will jump in as well.