You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@weex.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/11/23 04:13:00 UTC
[jira] [Commented] (WEEX-139) Provide system language infomation
[ https://issues.apache.org/jira/browse/WEEX-139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16263784#comment-16263784 ]
ASF GitHub Bot commented on WEEX-139:
-------------------------------------
GitHub user CYJB opened a pull request:
https://github.com/apache/incubator-weex/pull/902
[WEEX-139][ios]Provide system language infomation
Provide locale module, contains information about system language.
Example: [http://dotwe.org/vue/fc5e91d6f1a809bab2f073af53f4dd94]
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/CYJB/incubator-weex WEEX-139
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-weex/pull/902.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #902
----
commit 3b54a9a255554ecab67148f718605e90423c7bbb
Author: CYJB <f8...@126.com>
Date: 2017-11-23T04:11:15Z
[WEEX-139][ios]Provide system language infomation
Provide locale module, contains information about system language.
Example: [http://dotwe.org/vue/fc5e91d6f1a809bab2f073af53f4dd94]
----
> Provide system language infomation
> ----------------------------------
>
> Key: WEEX-139
> URL: https://issues.apache.org/jira/browse/WEEX-139
> Project: Weex
> Issue Type: Improvement
> Components: Android, iOS
> Affects Versions: 0.18
> Reporter: Shaojun Yang
> Assignee: zhengshihan
> Labels: module
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Weex page has no idea about current system language now, multiple language application cannot decide default language of the user.
> Weex should provide locale module, contains information about system language, as same as navigator.language (referrer [https://developer.mozilla.org/en-US/docs/Web/API/NavigatorLanguage/language]).
> {code:javascript}
> var locale = weex.requireModule('locale');
> // get preferred language of the user
> var language = locale.getLanguage()
> // an array of strings representing the user's preferred languages
> // referrer [https://developer.mozilla.org/en-US/docs/Web/API/NavigatorLanguage/languages]
> var languages = locale.getLanguages()
> {code}
> Example: [http://dotwe.org/vue/fc5e91d6f1a809bab2f073af53f4dd94]
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)