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
4 answers

How to modify the locale decimal separator within a single unit test in .NET?

In .NET (VB or C#) and using Microsoft.VisualStudio.TestTools.UnitTesting for Unit testing: How do I effectively change the locale decimal separator locally within a unit test so as String.Format("{0:0.0}", aDouble) (which AFAIK is locale-dependent)…
dacucar
  • 206
  • 3
  • 10
3
votes
2 answers

setlocale raising errno while a non-NULL value is returned

Consider the following minimalistic code fragment: #include #include #include int main() { const char *locale = setlocale(LC_ALL, ""); if (errno == ENOENT) { printf("Locale %s unavailable.\n", locale ?…
Bass
  • 4,977
  • 2
  • 36
  • 82
3
votes
1 answer

How to change locale of android system automatically via code

I have apk file of the application undertest(no source code,is robotium UI automated-tests).I need to change system locale automatically via code. Could anyone give me a mechanism or way to solve this problem? Someone recommended me this…
Almett
  • 876
  • 2
  • 11
  • 34
3
votes
1 answer

browser request header "Accept-Language" does not send country

I am implementing i18n in my webapp and am in the testing phase at the moment. I am using java.util.Locale on the server side to pass the locale to the relevant APIs (date time etc) that consume the information. Here is my setup: browser language…
3
votes
1 answer

Nodejs: Using i18n-2 Client side or Server side or both

I'm developing a proyect in nodejs, I want to add a feature for language translation. Checking on internet i saw 2 options that seem ok (i18n and i18n-2). I have added the proper code in my server side in order to configure it. In express.js var…
ssg
  • 129
  • 7
3
votes
1 answer

JDatePicker jar can't find local en_GB?

I have an error when I tried to use java.util.Locale in eclipse project: $Can't find bundle for base name i18n, locale en_GB Exception in thread "AWT-EventQueue-0" java.util.MissingResourceException: Can't find bundle for base name i18n, locale…
M. Namiz
  • 99
  • 8
3
votes
2 answers

List all the installed or supported languages in an android phone

How to get list of all the installed or supported languages that are listed under "Language and Input settings" programmatically in android. I have used Resources.getSystem().getAssets().getLocales() but it gives me only code of that language like…
Prithniraj Nicyone
  • 5,021
  • 13
  • 52
  • 78
3
votes
1 answer

Why did the digit grouping and decimal separator change for en-ZA from .NET 3.5 to .NET 4.0?

We have code in our system to format numbers and currency according to the regional settings selected by the user. One of our users has selected en-ZA and noticed that the digit grouping and decimal separators have changed with our migration to .NET…
Bernard Chen
  • 6,437
  • 5
  • 23
  • 27
3
votes
0 answers

Auto Detect Locale / Language for TextToSpeech Android

The app I am building requires me to speak out loud, using the inbuilt TextToSpeech algorithm, a random string from almost any language without using the Internet. I am not sure how to go about this. Below is what I have so far, but it does not work…
Travis Knight
  • 301
  • 1
  • 4
  • 18
3
votes
1 answer

symfony change locale in route during login

I'm stumbling upon an issue on changing the locale during the login event on a symfony (2.7) application. I was following the sticky locale symfony article http://symfony.com/doc/current/cookbook/session/locale_sticky_session.html, but not using the…
J. Hauser
  • 233
  • 1
  • 16
3
votes
2 answers

Locale <=> Time/Date format in Tomcat logs?

I can't seem to change the locale / date format in the Tomcat logs when running it from Eclipse. It's using a 12-hour clock and I want it to use a 24-hour clock instead (language is English, which already is what I want). Here's what I have tried so…
zb226
  • 9,586
  • 6
  • 49
  • 79
3
votes
1 answer

boost locale bad cast exception

The following simple code, compiled with -lboost_locale generates a bad cast exception. It is the same code in the boost tutorial itself. Any help? #include #include int main() { using namespace boost::locale; …
Alberto Contador
  • 263
  • 1
  • 13
3
votes
1 answer

Letter-only collation (was: Weird file ordering in Emacs dired with my locale)

I just noticed. And this is creepy. But here's my screenshot. So help me, maybe! TL;DR The question's at the bottom. Symptom -rw-r--r-- 1 jb jb 24287 mars 21 2012 array.c -rw-r--r-- 1 jb jb 28767 oct. 1 2014 arrayfunc.c -rw-r--r-- 1…
JB.
  • 40,344
  • 12
  • 79
  • 106
3
votes
1 answer

Get ONLY the list of locales that are shipped with my Android applicaiton

I know there are several ways that I can get the list of all of the Locales supported by the device. Has anyone been able to get the list of locales that you have included in your app? Using the following code I know I can get the list the device…
d3n13d1
  • 200
  • 12
3
votes
2 answers

Get browser locale automatically

I'm trying to internationalize my website using Symfony. This is my routing.yml: index: pattern: /{_locale} defaults: { _controller: AppBundle:Index:index, _locale: en } requirements: _locale: en|fr When the URL is just "/",…
mathieu_b
  • 383
  • 1
  • 5
  • 19