ActionScript: Capabilities.language
JavaScript: var lan = ((navigator.browserLanguage) ?
navigator.browserLanguage :
(navigator.language) ? navigator.language :
navigator.userLanguage);
Read more:
http://livedocs.adobe.com/flex/3/html/help.html?content=l10n_2.html
Choosing a locale
To determine which locale your users will want to experience your
application in, you can use one of the following methods:
- User prompt -- You can start the application in some default locale,
and then ask the user to choose their preferred locale.
- Capabilities.language -- The Capabilities.language property in
ActionScript provides the language code for Adobe® Flash® Player and Adobe
AIR™. On English systems, this property returns only the language code, not
the country code. This property returns the user interface language, which
refers to the language used for all menus, dialog boxes, error messages, and
help files in Flash Player and AIR.
- Accept-Language header -- When a browser makes an HTTP request, it send
a list of languages to the server in the Accept-Language header. You can
parse this header in your HTML wrapper and pass it as aflashVars variable
into your Flex application. If you use URLLoader to load an application, you
will not have access to this header.
- Browser and OS language settings -- You can access the browser's or
operating system's language settings in the HTML wrapper by using
JavaScript. You can then pass the values as flashVars variables to your
application. You can also use the ExternalInterface API to access the values
from within your Flex application. The language is typically accessible via
the Navigator object's language property. Depending on the browser, you
also access the userLanguage or systemLanguage properties. For more
information on using the ExternalInterface API, see Using the
ExternalInterface API to access JavaScript from
Flex<http://livedocs.adobe.com/flex/3/html/passingarguments_4.html#168338>
.
--
Aviral Sharma
Web: http://aviralsharma.com
On Tue, Jan 26, 2010 at 04:27, surendra chowdary <
[email protected]> wrote:
> Hi thanks for the reply..
>
> Everything i setup related to Localization and its working fine.
> But my requirement is if the client System language is in FRENCH then by
> default i have to load that language.
> for that i need to get the System Language.How can i get the local system
> language?
>
> thanks in advance,
> surendra.
>
>
> On Tue, Jan 26, 2010 at 9:54 AM, Aviral Sharma <[email protected]>wrote:
>
>> You need to use localization for that and its as easy as changing
>> value of variable BUT you need to setup localization when developing
>> (which is little time consuming)
>>
>> Further reading:
>> http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions:_Runtime_Localization
>>
>> Aviral
>>
>> On Jan 25, 3:43 am, surendra <[email protected]> wrote:
>> > Hi ,
>> >
>> > How to get System local language in flex ?
>> >
>> > with Regards,
>> > surendra.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Flex India Community" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<flex_india%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/flex_india?hl=en.
>>
>>
>
>
> --
> with Regards,
> Surendra.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<flex_india%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>
--
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en.