This content has been marked as final. Show 5 replies
Isn't <object> a subset of HTML?
...anyway, there is multiple methods depending of several factors... you could simply pass the locale string info like described here:
for example, inside your <object>, put <param name='flashVars' value='locale=fr_CA'/>
and replace fr_CA with whatever you need. The best is that you build your <object> tag in server-side script and parse the "Accept-language" HTTP header.
Search the web with "Localized" and "Flex"
hi Zal , Thanks for the reply.
Sure, I could pass the locale in flashvars, but I have to determine the browser locale at runtime. I do not want to have it hardcoded.
So, your option of "The best is that you build your <object> tag in server-side script and parse the "Accept-language" HTTP header. " seems to be good.
But I have got no idea of how to write a server side script and how to parse the Accept-language HTTP header. Can you please provide me with some more information and/or example
You can use System.capabilities in ActionScript with the language property to get the system locale:
Or you can have a server-side script return the browser locale to you:
First, what is your server-side language?
If its PHP, you could try with this:
I'm in a same situation. I need to be able to get the locale setting of the browser. Is there a way to do that within flex? I have a class that extends a DateField and I need to know the locale setting of the browser so I can determine which date format to display in the datefield textbox.
I tried to use Locale.getCurrent(Application.application.systemManager).toString() but this doesnt return locale settings for the browser. Anyone know how to get that?