cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Grebnov (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-8258) iOS getPreferredLanguage should be from the list of available localizations for the app
Date Wed, 13 Jan 2016 10:00:49 GMT

     [ https://issues.apache.org/jira/browse/CB-8258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sergey Grebnov updated CB-8258:
-------------------------------
    Labels: triaged  (was: )

> iOS getPreferredLanguage should be from the list of available localizations for the app
> ---------------------------------------------------------------------------------------
>
>                 Key: CB-8258
>                 URL: https://issues.apache.org/jira/browse/CB-8258
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Globalization
>         Environment: iOS
>            Reporter: Suresh Chandrasekharan
>              Labels: triaged
>
> In CDVGlobalization.m, the following line is used to get the preferredLanguage from getPreferredLanguage
>  NSString* language = [[NSLocale preferredLanguages] objectAtIndex:0];
> The issue with this is, for an application, if the system preferred language is not available
in Application Resource bundle,all framework messages will appear in the system preferred
language and all app specific strings will appear in a fallback language like en_US. 
> A second scenario is, like for a language like Portuguese, if only viewControllerBundle_pt.xlf
is existing as application resource but the system language selected is pt_BR, with the current
code, the fallback resource bundle viewControllerBundle_pt.xlf won't be activated and application
will appear in en_US
> Using the following, instead we can get a preferred language from the list of available
localizations for the an application, which is independent of the preferredLanguage for the
system.
> NSString *language = [[[NSBundle mainBundle] preferredLocalizations] objectAtIndex:0];



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message