blackberry-webworks / BB10-Webworks-API

An api repository for webworks
6 stars 1 forks source link

As a WebWorks developer, I can find out what the current system language and regional settings are #35

Closed kwallis closed 11 years ago

kwallis commented 12 years ago

To support the requirement to allow the user to select UI language and regional formats independently of each other, the platform and applications must implement separate parameters for each of those preferences. Instead of one locale parameter, there will be a UI language parameter and a regional preference parameter. These may be completely different - UI language set to French (fr), regional preferences set to et_EE (Estonian as spoken in Estonia). The applications must display the translated strings in French in this case, while dates, times, numbers, calendars, etc., must be displayed with Estonian formats.

Acceptance Criteria

REF: PR168768

kwallis commented 11 years ago

Updates with more description, and to capture UI localization requirements.

cc @nukulb

EricLeiLi commented 11 years ago

@kwallis @nukulb I did a quick investigation on BB10, I can find the document about how to check locale, etc. but it doesn't seem to have anything related to "Region". Can anyone find any hint for me?

EricLeiLi commented 11 years ago

@kwallis @nukulb In BB10, it does have country and language for locale, so if you did mean language and country, we can do it.

kwallis commented 11 years ago

This is changing from what currently exists. I will send the details offline.

----- Original Message ----- From: Lei Li [mailto:reply@reply.github.com] Sent: Thursday, July 12, 2012 01:12 PM To: Ken Wallis Subject: Re: [BB10-Webworks-API] As a WebWorks developer, I can find out what the current system language and regional settings are (#35)

@kwallis @nukulb In BB10, it does have country and language for locale, so if you did mean language and country, we can do it.


Reply to this email directly or view it on GitHub: https://github.com/blackberry-webworks/BB10-Webworks-API/issues/35#issuecomment-6941395


This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

gtanner commented 11 years ago

Spec is showing methods but it looks like it was implemented as properties:

ie:

var value = blackberry.system.language();

but was coded as:

var value = blackberry.system.language;

what is correct?

nukulb commented 11 years ago

there is also navigator.language But eric li should be able to confirm

------Original Message------ From: Gord Tanner To: Nukul Bhasin Subject: Re: [BB10-Webworks-API] As a WebWorks developer, I can find out what the current system language and regional settings are (#35) Sent: Jul 31, 2012 4:07 PM

Spec is showing methods but it looks like it was implemented as properties:

ie:

var value = blackberry.system.language();

but was coded as:

var value = blackberry.system.language;

what is correct?


Reply to this email directly or view it on GitHub: https://github.com/blackberry-webworks/BB10-Webworks-API/issues/35#issuecomment-7409901

Sent from my BlackBerry device on the Rogers Wireless Network

gtanner commented 11 years ago

Will navigator.language always be the same?

if it is, what is the point of having this API?

kwallis commented 11 years ago

Navigator.language does not give you the region. So you still need system.region. We have decided to leave system.language as well rather than taking it out. Will be easier for discovery and could make things cleaner than being split in different namespaces.

Ken Wallis

Manager - Eclipse Tools Research In Motion 905-629-4746 x14369

-----Original Message----- From: Gord Tanner [mailto:reply@reply.github.com] Sent: Tuesday, July 31, 2012 4:17 PM To: Ken Wallis Subject: Re: [BB10-Webworks-API] As a WebWorks developer, I can find out what the current system language and regional settings are (#35)

Will navigator.language always be the same?

if it is, what is the point of having this API?


Reply to this email directly or view it on GitHub: https://github.com/blackberry-webworks/BB10-Webworks-API/issues/35#issuecomment-7410094


This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

gtanner commented 11 years ago

How is a value of : "en-CA" or "en-US" or "en-UK" not telling us the region as well as the language?

nukulb commented 11 years ago

the docs are here

http://blackberry-webworks.github.com/WebWorks-API-Docs/WebWorks-API-Docs-next-BB10/view/blackberry.system.html

which enlists system.language and system.region as properties and not functions

kwallis commented 11 years ago

While they both return five letter values, they will actually be different values. Ie. in the settings you would have something like:

Language: "English - United States" Region: "Canada"

And you get these for the WebWorks properties: language: en_US

region: en_CA

Ken Wallis

Product Manager – BlackBerry WebWorks

Research In Motion

(905) 629-4746 x14369


From: Gord Tanner [reply@reply.github.com] Sent: Tuesday, July 31, 2012 4:27 PM To: Ken Wallis Subject: Re: [BB10-Webworks-API] As a WebWorks developer, I can find out what the current system language and regional settings are (#35)

How is a value of : "en-CA" or "en-US" or "en-UK" not telling us the region as well as the language?


Reply to this email directly or view it on GitHub: https://github.com/blackberry-webworks/BB10-Webworks-API/issues/35#issuecomment-7410362


This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

jeffheifetz commented 11 years ago

Sorry to jump on this so late but just want to confirm what the purpose of blackberry.system.language.

I understand that we need a separate setting other than navigator.language since BB10 offers both language and region settings. But why do we need a duplicate language setting?