locale

getISOCountries() method displays only two letters of contry name. Is Get full name of country using this method possible?

I used following code, but it displays only 2 digit of ISO country name. For example, for "INDIA", it only display "IN". Can I show full name as "INDIA" ? String[] loc= Locale.getISOCountries(); for(int a=0;a<loc.length;a++) { System.out.println("ISO Contry "+a+":"+loc[a]); } I want full name of ISO country. Is it possible to get ...

Python: Access Posix' locale database without setlocale()

The setup is a Django based website on an Ubuntu server system with lots of useful information in /usr/share/i18n/locales. The question: Can I access this pool of wisdom without using Python's locale.setlocale() afore? The reason: The docs say, that it is very expensive to call setlocale(), and affects the whole application. But in...

pybabel or other l10n libraries for PHP

Babel or pybabel is an interface to the CLDR (Common Locale Data Repository) in Python. As such, it has the same 'knowledge' as PHP's i18n functions and classes (if the appropriate locales are installed on the host), but without the hassle of using process-wide settings like setlocale(). Is there a similar library or toolkit for PHP? Es...

PowerShell, formatting values in another culture

Is there an easy way in PowerShell to format numbers and the like in another locale? I'm currently writing a few functions to ease SVG generation for me and SVG uses . as a decimal separator, while PowerShell honors my locale settings (de-DE) when converting floating-point numbers to strings. Is there an easy way to set another locale f...

How to change the default font for a windows unicode locale / language

Hi, When I select a language from the language toolbar, windows automatically changes the input font to one with characters from that language. Is there are a way to change the default font to something else? Thank you for your help ...

How to get a facet from a std::locale object?

I want to get the numpunct<char> facet for the native locale. I can generate a native locale object by constructing an object with an empty string std::locale native_loc(""), but once I have it how do I get a numpunct from it? The documentation I've found doesn't really show the connection between the two. ...

Set a locale in javascript

Jquery test the validity of a date via: !/Invalid|NaN/.test(new Date(value)) new Date(dateString) is the same as Date.parse(dateString) and uses browser/os locale to parse the string. im trying to parse DD/MM/YYYY but i get an error because my browser is looking for MM/DD/YYYY. Since my product will be used only by DD/MM people, i wa...

Rails where is en.yml

Where can Ifind the default em.yml file. I know for translated files on GitHub but I would like to have EN version. Thx. ...

Retrieve browser locale from httpsession ?

Is it possible to derive the preferred language from a httpsession object (javax.servlet.http.HttpSession) ? It is possible to get it from the servletrequest but I dont have that. Thanks for any ideas. Sven ...

How to override the behavior of Input type="file" Browse button?

Hi All, I need to change the locale/language of the browse button in input type="file" We have a special function to change the locale of any text to the browser language such as en-US es-MX etc. Say changeLang("Test"); // This will display test in Spanish if the browser // locale is es-MX What I need to do is t...

How to make strtotime parse dates in Australian (i.e. UK) format: dd/mm/yyyy?

I can't beleive I've never come across this one before. Basically, I'm parsing the text in human-created text documents and one of the fields I need to parse is a date and time. Because I'm in Australia, dates are formatted like dd/mm/yyyy but strtotime only wants to parse it as a US formatted date. Also, exploding by / isn't going to w...

Does iPhone have locale values for measurement units? Eg kg, lb and etc?

I've searched the iPhone documentation and on google but have not found any information regarding locale values for preferred measurement units such as kg or lb and etc. Does anyone know if this does exist? Or conversely NOT exist? Thanks ...

Reading in Russian characters (Unicode) using a basic_ifstream<wchar_t>

Is this even possible? I've been trying to read a simple file that contains Russian, and it's clearly not working. I've called file.imbue(loc) (and at this point, loc is correct, Russian_Russia.1251). And buf is of type basic_string<wchar_t> The reason I'm using basic_ifstream<wchar_t> is because this is a template (so technically, ba...

Specifying locale for http request/response

I have a ReSTful web service which needs to parse locale-sensitive data from the request. This data could either be in an XML body or part of the query string. Is there any acepted way of determining which locale the data is being sent in (and by extension the locale in which the response should be sent)? One option is simply to specify...

Start 2 emulators with different locale android

Most of the idea is in the title, I just would like to know if it is possible to start 2 emulators at the same time with 2 different locale (to test the I18n of my app). If there was a way of doing it in Eclipse, that would be greater... ...

how to detect operating system language (locale) from java code

What is the correct way of knowing operating system language (locale) from java code? I have tried Locale.getDefault() System.getProperties("user.language") etc. but they are not correct nothing actually displays the "System Locale" which is available by the command "systeminfo" in windows. Please help. ...

Translating external api results in Drupal

We're building a multi-language Drupal stack and one of the concerns we have is that our payment processor is going to have to send back some information to us. We've been able to narrow this down so that the strings they're sending back look like <country code>-<number of months> so we can easily translate that into any number of lang...

HttpServletRequest.getLocale() to return Spring's RequestContext locale

Hello, I have setup default locale in my LocaleResolver configuration, so when I ask my RequestContext for locale I get what I've setup there. What I want is to be able to retreive locale by calling HttpServletRequest.getLocale(). I know I can use RequestContextUtils.getLocale(), but I need to do this from JSPs, where I am not allowed ...

Facebook user language / internationalization

I'm developing a Facebook application for a business page. The application can only be accessed as a tab, meaning there is no box or direct access intended. I've done my share of searching and even though I hate asking for help when I know the information I'm after must be there somewhere, I've reached the point of exhaustion and beg for...

How can I fix a locale warning from perl?

When I run perl, I get the warning: perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). Any ideas on how to fix it? ...