Questions tagged [locale]

In computing, locale is a set of parameters that defines the user's language, country and any special variant preferences that the user wants to see in their user interface. Usually a locale identifier consists of at least a language identifier and a region identifier.

Examples of variable output controlled by a locale is whether a date is displayed as 25/12/2012 or 12/25/2012 or some other format, and whether a decimal number is displayed as 123,456.78 or 123.456,78

5203 questions
3
votes
2 answers

Android: How to set culture values for application

) i'm a C# developer and now i started to program apps for android. In C# we have the CultureInfo object where we can set the values for the culture of the aplication. There is a similar object in java (android) to let me do that ¿? i found that i…
Ramiro Nava Castro
  • 337
  • 1
  • 7
  • 14
3
votes
1 answer

How can I change the locale in Google Chrome extension?

I need to create an extension that would change my browser locale on a mouse click. I'm developing a bilingual web app, and I'm setting the i18n messages according to the browser locale. But this requires me to get to the wrench, then under the…
Zlatko
  • 18,936
  • 14
  • 70
  • 123
3
votes
2 answers

Java Locale Font question..?

[EDIT] this happend on OSX with Java 1.5! (but may also happen on Windows!) It seems japanese users of my Java Swing program cannot write japanese symbols in JTextFields. Actually they can write them but do not see them. They only see blocks which…
Andy Schmidt
  • 251
  • 1
  • 3
  • 9
3
votes
2 answers

How to get get Time Zone from Locale value in android?

Hi I want to get Time Zone from locale. My code is package com.my.country; import java.text.DateFormat; import java.util.ArrayList; import java.util.Date; import java.util.Locale; import java.util.Map; import…
malavika
  • 1,331
  • 4
  • 21
  • 54
3
votes
2 answers

Symfony2 locale detection and translation

Here is what I'm stuck on. I'm working on Symfony2 and trying to make the translations working. But somehow, I can't make it work as it should. Here's what I got. In the config.yml translator: { fallback: de } session: default_locale:…
ArVan
  • 4,225
  • 8
  • 36
  • 58
3
votes
1 answer

Get a language's ISO identifier from its name

I know I can get the device's current Locale easily but in my case, the user chooses the language from a UIPickerView. Each language is a string in a array typed exactly the same way the phone has it in the settings for setting the device…
SimplyKiwi
  • 12,376
  • 22
  • 105
  • 191
3
votes
1 answer

Arabic text appearing reverse when Arabic text comes with digit

I need to print the below string which is in Arabic on TextView in Android. It is printing good but when the Arabic text and digits falls in a same string, Android put the digit at end! here is my code String str = "مقر 44"; TextView textView =…
Rohit Mandiwal
  • 10,258
  • 5
  • 70
  • 83
3
votes
1 answer

Available locale display country when "inLocale" is set to Turkish (JDK 1.6.0_29)?

According to the javadoc for Locale.getDisplayLanguage(Locale inLocale), Returns a name for the locale's country that is appropriate for display to the user. If possible, the name returned will be localized according to inLocale. For example,…
mre
  • 43,520
  • 33
  • 120
  • 170
3
votes
1 answer

Multiple defaults for Locale in Spring Web MVC?

I would like my Spring-MVC-based web application to default to SK locale when CZ locale is passed in, however any other locale should default to EN. The site I am designing should automatically display in Slovak language when visited from a computer…
Peter Perháč
  • 20,434
  • 21
  • 120
  • 152
3
votes
1 answer

Internationalization(i18n) for Javascript alert messages

I wish I find a solution for this.How can internationalization be implemented for Javascript Alert messages?. I have already implemented i18n from my jsp pages. I am using spring MVC.
Goutham
  • 80
  • 12
3
votes
1 answer

Converting to and from Doubles and Strings independent of locale

I'm having problems with users that have their locale settings set to non US countries getting errors when converting doubles to and from strings. So far I believe I have the correct way to convert the strings to doubles: public double…
Matt
  • 2,650
  • 4
  • 36
  • 46
3
votes
1 answer

Setlocale sets decimal point to dot instead of coma

This only occurs on IIS 7.5 server on Windows 7 (on linux decimal point is set just fine). $locale = setlocale(LC_ALL, 'pl_PL.utf8', 'pl_PL', 'pl', 'polish'); echo $locale; echo…
matino
  • 17,199
  • 8
  • 49
  • 58
3
votes
1 answer

How can I convert an IETF BCP 47 language code into a display string?

How can I convert an IETF BCP 47 language code [e.g zh-cmn-Hant-HK] into a display string [e.g. "Mandarin Chinese, Traditional (Hong Kong SAR)"] in Android (Java)? Some background. I am working with the speech to text APIs. I am calling…
Theo
  • 5,963
  • 3
  • 38
  • 56
3
votes
2 answers

How can I get the user's locale when running as root?

I am running as root, but have the user's uid (e.g. 504). How can I work out the user's locale (in my case en_GB)? The following does not work: setuid(user_uid); fprintf(stderr, …
fredley
  • 32,953
  • 42
  • 145
  • 236
3
votes
1 answer

opengraph objects only show default locale in stream

I have an opengraph object https://example.com/object that supports multiple locales, specifically en_US and fr_FR with the first as default. Parsing it in Facebook's Object Debugger correctly shows both locales as og:locale:alternate properties and…
dleshem
  • 43
  • 5