Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get the default language of the device. #90

Closed
RFO-BASIC opened this issue Jun 9, 2013 · 2 comments
Closed

Get the default language of the device. #90

RFO-BASIC opened this issue Jun 9, 2013 · 2 comments

Comments

@RFO-BASIC
Copy link
Owner

Requested by a user.
http://rfobasic.freeforums.org/the-current-default-language-of-the-device-t1588.html

Looks doable:
http://stackoverflow.com/questions/4212320/get-the-current-language-in-device

@jMarcS
Copy link
Collaborator

jMarcS commented Jul 15, 2014

With a nudge from Antonis, presumably prompted by the localized format_using$(), I've revisited this issue. As Paul said, doable. The problem was where to put the result. It could be a new command, of course, but I've thought for some time we should have a command that would return a variety of system parameters.

We already have DEVICE, which returns a string containing some of the data from the Build class. It's a simple extension to take everything from that string and put it in a Bundle. Then we can start adding things to the Bundle, as the fancy strikes. So:

DEVICE <sexp>
Returns a formatted string containing Brand, Model, Device, Product, and OS

DEVICE <nexp>
Returns a pointer to a Bundle that contains the same five Build elements, and some others.
Currently, "others" means keys "PhoneNumber", "Language", and "Locale".
"PhoneNumber" is the string returned by the MyPhoneNumber command.
"Language" is the default language of the device, as a word (e.g, "English").
"Locale" is a set of language and country codes, two letters each, such as "en_US". These represent the default locale of the device. The format is suitable for use as the <locale_sexp> of the USING$()/FORMAT_USING$() functions.

What else should go in there?

jMarcS added a commit to jMarcS/Basic that referenced this issue Jul 15, 2014
@jMarcS jMarcS mentioned this issue Jul 17, 2014
@jMarcS
Copy link
Collaborator

jMarcS commented Jul 22, 2014

Released in v01.81, 2014/07/21

@jMarcS jMarcS closed this as completed Jul 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants