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 there a dedicated Language Class in Java?

While refactoring one of my projects, i replaced all language ISO Codes like "en" and "de" Strings with the Locale Class and its constants Locale.ENGLISH and Locale.GERMAN to make it more refactor save and to minimize error sources. I use then…
Martin Schlagnitweit
  • 2,042
  • 6
  • 26
  • 42
3
votes
1 answer

Android localization locales do not work, problems with all region codes

I need to add sub locales like for Switzerland to my app additionally to the normal German one. The locale extension to the resource folder for German I found is de. So My folder is named "values-de". That works fine. Then I added "values-de_CH" and…
user387184
  • 10,953
  • 12
  • 77
  • 147
3
votes
2 answers

Is there any current proposal I can follow about adding proper locale support to JavaScript?

Even though all major operating systems and programming languages/APIs have had locale support for at least a couple of decades, it seems that JavaScript still does not! With JavaScript becoming more and more of a full application programming…
hippietrail
  • 15,848
  • 18
  • 99
  • 158
3
votes
5 answers

How to support multiple language in a Linux C/C++ program?

For example, in this simplest hello world program: #include int main() { std::cout<<"Hello World!"<
Deqing
  • 14,098
  • 15
  • 84
  • 131
3
votes
1 answer

My app doesn't have 'Translate your app' link

I'm trying to translate my app open graph actions, I've searched everywhere and the only thing I read is to click 'Translate your app' link (http://www.facebook.com/translations/admin/) and 'Visit translations admin panel'…
Jorge Fuentes González
  • 11,568
  • 4
  • 44
  • 64
3
votes
1 answer

Detect locale and alter url (redirect) to include locale

What i want to do is, to detect the language of a users browser and redirect him to a page containing the locale in url. I thought, the easiest way would be, to register a kernel listener. So that is what i did: services: …
madc
  • 1,674
  • 2
  • 26
  • 41
3
votes
3 answers

From locale to ansi codepage to java charset?

is there a way to get a java.nio.charset.Charset from an ANSI CODEPAGE and the ansi codepage from a locale? For example, if i have the locale "en_US" i want to have the charset "cp1252", so i can call private final Charset CS1252 =…
3
votes
1 answer

std::isalpha throws bad_cast when using with boost::locale

I have some troubles with using boost::locale (1.49) on Debian 7 GNU/Linux (version of GCC is 4.6.3-1). The code is saved in cp1251. Using functions like "isalpha" (or "boost::algorithm::is_alpha") ends up with exception (bad_cast). Looks like that…
Nemo
  • 155
  • 1
  • 7
3
votes
1 answer

Check which Locale is running in Android

How do I programmatically check which Locale is running currently on the device?
mrd
  • 4,561
  • 10
  • 54
  • 92
3
votes
2 answers

Java: ExceptionInInitializerError caused by NullPointerException when constructing a Locale object

I'm working on localization for a program I've written with a couple other guys. Most of the strings now load in the appropriate language from an ini file. I'm trying to do the same with the format of currency in the program. However, I'm getting a…
3
votes
1 answer

Setting Boost regex locale?

In boost 1.48.0 I find this in the regex code (boost/regex/v4/w32_regex_traits.hpp): w32_regex_traits() : m_pimpl(re_detail::create_w32_regex_traits(::boost::re_detail::w32_get_default_locale())) { } //...// BOOST_REGEX_DECL…
l33t
  • 18,692
  • 16
  • 103
  • 180
3
votes
1 answer

What is the right collation to be for a PostgreSQL database which may be used in different languages?

I have a database created by: -- Database: adatabase -- DROP DATABASE adatabase; CREATE DATABASE adatabase WITH OWNER = adatabaseowner ENCODING = 'SQL_ASCII' TABLESPACE = pg_default LC_COLLATE = 'C' LC_CTYPE = 'C' …
vfclists
  • 19,193
  • 21
  • 73
  • 92
2
votes
2 answers

Efficiency of gettext : in-memory translation

I have an embedded system with Flash and a very low end CPU and less RAM. I wanted to know how efficient is the gettext language translation using .MO file. For doing the locale language string fetch, do every time gettext read MO file from flash…
Lunar Mushrooms
  • 8,358
  • 18
  • 66
  • 88
2
votes
1 answer

how to set Indian english language in TextTOSpeech?

I am creating one application which convert text into speech in Indian English. I got this("English, India (en_IN)") value from one site but i don't know how and where set this value to locale. Please give me hint how to set this language. And…
Sandip Armal Patil
  • 6,241
  • 21
  • 93
  • 160
2
votes
2 answers

Reading scandinavian letters correctly into a data frame

When I try to read a comma separated values-file containing scandinavian letters into a data frame in r, with the read.table() command, it doesn't come out right. That is, I want letters such as "å", "æ", "ø", "ä" and "ö" to be included correctly.…
Speldosa
  • 1,900
  • 5
  • 21
  • 36