I have added a french string.fr-FR.xls file to the string resources directory and imported it accordingly from the admin control panel. My question is now: how to we let the users control which language they want to view?
Thanks for your help!
I have added a french string.fr-FR.xls file to the string resources directory and imported it accordingly from the admin control panel. My question is now: how to we let the users control which language they want to view?
Thanks for your help!
Give them links to alternate locale versions.
Example:
http://my.site.com/default.aspx?localesetting=fr-FR
Thanks for you help! That will definitely help getting us in the right direction.
However, upon testing it, I still received the English version of our site.
- Import french strings into app. (successful)
- Clear cache.
- Open http://my.site.com/default.aspx (successfull)
- Add localesetting=fr-FR to querystring.
- Page refreshes, but still in english.
Did I miss something? Thanks!
[Update]
Some additional information:
- after clearing all local browser information (cookies, temp files, etc.) changing the language works on the first click. However, subsequent language changes still require two clicks.
- I have verified that the cookie is properly receiving the value.
- I have added the localization links in the skin1/template.ascx file.
Also, I have noticed that once I have entered the shopping cart it is no longer possible to change the language. This appears to be due to the ASPDNSFGUID cookie being set, as once deleted, I am able to translate again.
Last edited by Mike; 11-11-2008 at 12:55 PM.
So I managed to get it work *somewhat*.
What happens now is that I have to click twice on the link with the localesetting to make the language stick.
My suspicion is that the querystring is is parsed after the locale is set. Is this true?
I think a better bet would be to use the (!COUNTRYSELECTLIST!) token.
From http://manual.aspdotnetstorefront.co...n_tokens.ashx: "Displays a dropdown list of installed locales that customers can use to choose the language to view the site in."
Scott, thanks for your reply! Is there a way to do this so that instead of a drop-down I can display a list of country flags? If not, I'll go with the drop-down, but flag icons would be preferred.
Thanks again!
is it possible to retrieve the flags for each locale?
regards,
chris
You could do this with a bit of custom code, but not out of the box. Another way to handle it I suppose would be hard-code the flag images in your skin, and hard-code the link to the corresponding locale... eg.
HTML Code:<a href="./setlocale.aspx?localesetting=en-US"><img src="./images/usflag.gif"/></a>
I dont think there are images of each country in the images folder? am i right?
No there is no certain folder for each country, but you may create if you want. Just make sure the location of your image would be called correctly.
Ex:
<a href="./setlocale.aspx?localesetting=en-US"><img src="./images/UnitedStates/usflag.gif"/></a>
Check if this works for you