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
1 answer

How to format numbers according to locale in Haskell?

In Python I can use locale.format to pretty-print numbers according to locale setting: >>> import locale >>> locale.setlocale(locale.LC_ALL, "en_US.UTF-8") 'en_US.UTF-8' >>> locale.format("%.2f",1234567.89,grouping=True) '1,234,567.89' How can I do…
sastanin
  • 40,473
  • 13
  • 103
  • 130
3
votes
2 answers

Wrong datetime - PHP+ SQL Server

echo date('d/m/Y H:i:s'); //output: 13/12/2012 11:10:57 print_r(getDataArray($dblink, 'select current_timestamp')); //output: Array ( [0] => Array ( [computed] => **2012-04-12 11110:05** ) ) When I try to get a "current_timestamp" + php + sql…
Eduardo Stuart
  • 2,869
  • 18
  • 22
3
votes
0 answers

How to format incomplete dates and times in a locale specific manner

How can one format incomplete dates and/or a times in a locale specific manner? I have a date/time stored in a set of 7 strings: dayOfWeek - The day of the week. ([1,7]) dayOfMonth - The day of the month. ([1,31]) monthOfYear - The month of the…
Kelly Davis
  • 161
  • 6
3
votes
2 answers

Convert NSString with a number to appropriate phone number localization format

NSString *phoneNumber = @"2310234432"; I would like to create a new string out of the above but format the phone number according to the current localization. Is there a "native" way I can do this or do I have to write my own methods to return it…
epron
3
votes
1 answer

Java JFileChooser unable to detect foreign languages

In my application, the user chooses a file for which JFileChooser is used. It so happens that if the folder name is in some other language, then it doesn't detect that folder. For example: On the desktop, if the folder name is spillet sitt på er…
Jatin
  • 31,116
  • 15
  • 98
  • 163
3
votes
1 answer

UTF-8 locale drop

I've wrote this test script: \n"; …
Yekver
  • 4,985
  • 7
  • 32
  • 49
3
votes
1 answer

android US Locale not working

I have the following problem: I want to change the language of my app programmatically. So I used shared Preferences to change the locale. Locale locale2 = new Locale("b0"); Locale.setDefault(locale2); Configuration config2…
user1750720
  • 199
  • 1
  • 2
  • 10
3
votes
2 answers

Alphabetical order in Chinese - java.text.Collator

I've been testing alphabetical sorting in Chinese (if I may call it so). This is how Excel sorts some example words: 啊<波<词<的<俄<佛<歌<和<及<课<了<馍<呢<票<气<日<四<特<瓦<喜<以<只 0<2<85
MaDa
  • 10,511
  • 9
  • 46
  • 84
3
votes
2 answers

Retrieving locale out of timezone_identifier -php

Is there an easy way to retrieve the locale from the timezone_identifier? For example: date_default_timezone_set('Europe/Berlin'); The Locale in that case should de_DE.
casa
  • 33
  • 3
3
votes
1 answer

How to create a patch with English ASCII header by Tortoise SVN?

My Windows's locale is Chinese/Code Page 936. When I create a patch by Tortoise SVN (even if the Tortoise SVN is in English UI), it create a patch file with header like this: Index:…
Yang Bo
  • 3,586
  • 3
  • 22
  • 35
3
votes
2 answers

Saving Locale in a Database

On my JSF 2.1 Application with JDK 7, I searched for a solution to provide my users the possibility to save their preferred language. So, on the next login the language should received from the Database and replaced by the language from the default…
Cruel
  • 75
  • 1
  • 4
3
votes
1 answer

Why does the "international currency symbol" end with a space character?

// code #include #include #include #define SIZE 32 const char name[][SIZE] = {"en_US.utf8", "zh_CN.utf8", "zh_HK.utf8", "zh_TW.big5", "fr_BE.iso88591"}; int main(void) { int count = sizeof(name) / SIZE; for…
ZhangXiongpang
  • 280
  • 2
  • 7
3
votes
2 answers

Unable to parse a date in the Finnish locale

I'm trying to parse a Finnish date using the examples I've found here on Stack Overflow but I keep getting a parsing exception. Here's my snippet: SimpleDateFormat dftFormat = new SimpleDateFormat("dd MMMM yyyy", new Locale("fi", "FI")); Date…
Mridang Agarwalla
  • 43,201
  • 71
  • 221
  • 382
3
votes
2 answers

Available translations on CDN for jquery.validate

I am using Jquery.validate in a multilingual project. All works good, but I have 2 questions (ok, my real question is No. 2): 1) I am loading it from Microsoft CDN: http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js and it…
Christian K.
  • 528
  • 6
  • 16
3
votes
1 answer

Java croatian locale

http://www.oracle.com/technetwork/java/javase/locales-137662.html Here is the list of supported locales for Java. How do I set them? The line Locale.setDefault(Locale.CROATIAN); doesn't work, although croatian it's listed as supported. Is there…
Ivan Karlovic
  • 221
  • 5
  • 14