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

Is locale setting global in perl?

I'm debugging a perl script which looks like this (simplified): #!/usr/bin/perl use strict; use warnings; use Evil::Module; printf "%.3f\n", 0.1; This script outputs 0,100 (note , instead of .). If I comment out the use Evil::Module…
Eugene Yarmash
  • 142,882
  • 41
  • 325
  • 378
3
votes
2 answers

Android - how to use Cyrillic letters in left drawerLayout

I want to use cyrillic letters in my left drawerlayout. It should work like a menu. I have tried to format a string to cyrillic locale but it does not work, instead it is replaced with ??? private String[] drawerTitles; drawerTitles[0] =…
ninjaxelite
  • 1,139
  • 2
  • 20
  • 43
3
votes
0 answers

How do I read a Windows-1252 file using Rcpp?

I want to force the input format when reading a file into Windows-1252 encoding together with Rcpp. I need this since I switch between Linux/Windows environments and while the files are consistently in 1252 encoding. How do I adapt this to…
Max Gordon
  • 5,367
  • 2
  • 44
  • 70
3
votes
2 answers

Is there a separate Java locale for Mandarin and Cantonese?

I'm trying to use the JDK to get the names of different languages translated into other languages. For example: new Locale("en", "US").getDisplayLanguage(new Locale("en", "US")); // English new Locale("en", "US").getDisplayLanguage(new Locale("fr",…
Adam
  • 43,763
  • 16
  • 104
  • 144
3
votes
1 answer

Getting Language Code/Locale from Facebook Graph API

I have succesfully retrieved a language that a Facebook User knows using the Graph API the JSON looks like the following. languages = ( { id = 105541139480550; name = Indonesian; }, { id = 106059522759137; …
JayVDiyk
  • 4,277
  • 22
  • 70
  • 135
3
votes
0 answers

Return a Malayam String from another class in android/java

May be a very silly but i am not able to figured it out. requirement is to print Malayalam text.. I am able to achieve in following way. class MainActivity extends Activity{ @Override protected void onCreate(Bundle savedInstanceState)…
Biplab
  • 564
  • 1
  • 5
  • 19
3
votes
1 answer

Laravel: Locale Session: Controller gets Parameter to change it but it cant. U have to hardcode it

I tried to create a Form and do away with Ajax. Yes, the form at least does send the parameter down to the Controller as I var_dumped it and exited in order to see if it had gotten the new value, and yes it did, but guess what? and here is the…
patricio
  • 350
  • 2
  • 5
  • 13
3
votes
1 answer

How to set a double format by locale

I those input strings: 10000,20 4000,10 5,400.20 I am trying to format them with locale: nf = NumberFormat.getInstance(Locale.FRANCE); double newLoc = nf.parse(split[5]).doubleValue(); And also like this: nf =…
TjDillashaw
  • 787
  • 1
  • 12
  • 29
3
votes
1 answer

FacesContext#getViewRoot() returns null while setting for first time

I am trying to change my JSF application locale in one page and that has to change all my pages locale. I have followed this link, and it works well Localization in JSF, how to remember selected locale per session instead of per request/view If I…
jose
  • 303
  • 4
  • 17
3
votes
2 answers

What is the correct way to get a LOCALE_SSHORTDATE that is guaranteed to have a full (4-digit) year number?

I want to create a date-time picker control that shows both date and time, as a combination of the DTS_SHORTDATECENTURYFORMAT and DTS_TIMEFORMAT styles. Since there is no such style built into the date-time picker, I have to do it myself with…
andlabs
  • 11,290
  • 1
  • 31
  • 52
3
votes
1 answer

localeCompare options in nodejs unexpected result

This is from a node cli session: > var a = 'foo12'; undefined > var b = 'foo3'; undefined > var s = [a , b]; undefined > s.sort(function(a, b) { ... return a.localeCompare(b, 'en', { numeric: true }); ... }); [ 'foo12', 'foo3' ] This is from the…
bcr
  • 1,328
  • 11
  • 27
3
votes
1 answer

Issue with IDWriteFont::GetInformationalStrings(...) on Windows 7 (Japanese system locale)

I am using IDWriteFont::GetInformationalStrings(...) to get the full name of a font on Windows 7 (Japanese locale ja-JP) and here is the issue : When i pass DWRITE_INFORMATIONAL_STRING_FULL_NAME or DWRITE_INFORMATIONAL_STRING_POSTSCRIPT_NAME as the…
newuser
  • 105
  • 8
3
votes
3 answers

how to get current locale in PHP

I would like to get the current system locale of a server (say windows 7 os). This is to ensure that different language setting uses different parts of code in PHP. However, I could not find any API that does this. Can anyone tell me the name of…
wordwannabe
  • 103
  • 1
  • 10
3
votes
0 answers

Upgrading to Capistrano 3: prompt with 'translation missing: en.capistrano.questio' when running deploy:check

I'm in the process of upgrading an app from Rails 3 to Rails 4. In the process, I left capistrano at version 2 since that is a hefty upgrade on its own and now I'm getting to that. The issue I'm currently seeing is that when I run cap production…
sixty4bit
  • 7,422
  • 7
  • 33
  • 57
3
votes
2 answers

How to get current locale of Eclipse from a plugin?

The locale of Eclipse can be set at start up via eclipse.ini adding this line: -Duser.language= But how can I get the locale in an Eclipse RCP application (plugin)?
CIOC
  • 1,385
  • 3
  • 19
  • 48