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

Custom change of NumberFormat for (Dutch) locale

I have a problem. I work with amounts in application, and I need to localize the format. I use the NumberFormat.getCurrencyInstance() of java.util.Locale. By most cases it looks just fine. But the negative numbers are the problem. The predefined…
jaruss
  • 153
  • 1
  • 9
3
votes
1 answer

What is std::mbstate_t?

I'm creating a custom locale by deriving from std::codecvt. Most of the methods I'm supposed to implement are pretty straight forward, except for this std::mbstate_t. On my compiler, vs2010, it's declared as an int. But, google tells me it's a POD…
Twifty
  • 3,267
  • 1
  • 29
  • 54
3
votes
3 answers

How to get all Java supported Locales

When Google you will find lot of materials to find all the supported Locales by Java. But its all confusing. For example [http://sanjaal.com/java/tag/java-locale-tutorial/] show an output of 210 locales. But when I run the same program I get only…
Ish
  • 171
  • 1
  • 2
  • 10
3
votes
1 answer

gedmo doctrine translatable extension. Retrieve all translations or a specific one (different from the current locale)

I've an entity that uses gedmo doctrine translatable extension. I'm able to load this entity in the current locale. Now, for an admin panel where I want users to see and edit the various translations, I want to show all the translations or a…
dop3
  • 391
  • 1
  • 14
3
votes
1 answer

Reading Excel files in a locale independent way

I am using the following code to read data from various Excel files: // IMEX=1 - to force strings on mixed data // HDR=NO - to process all the available data // Locale 1033 is en-US. This was my first attempt to force en-US locale. …
JustAMartin
  • 13,165
  • 18
  • 99
  • 183
3
votes
2 answers

get current culture or browser locale on mvc 4

How do you get current culture or browser locale on MVC 4. I find some samples which gets it from HttpContext and HttpRequest but this doesnt work on MVC 4. How do you do it on MVC 4?
DarthVader
  • 52,984
  • 76
  • 209
  • 300
3
votes
4 answers

C# string to SqlDateTime: how to set format for recognition?

I need to use SqlDateTime.Parse(val) where val is a string such as " 23.3.1992 00:00:00 ". The string is in European format, that is, day precedes month. However Parse wants "American" format. How I can tell it to use particular datetime format /…
onkami
  • 8,791
  • 17
  • 90
  • 176
3
votes
2 answers

Converting String to Date in java

I am programming in java, and have a little problem since yesterday in parsing Date (converting from String to Date). I am getting this exception : java.text.ParseException: Unparseable date: "Fri May 24 18:47:31 GMT+01:00 2013" Here is my…
omar
  • 33
  • 2
3
votes
2 answers

C# - Am I replacing perfectly good code?

I had a quick function to format a date, here it is: public static string archiveServerDateTime(string datetime) { DateTime tempDateTime = DateTime.ParseExact(datetime,"dd.MM.yyyy HH:mm:ss", null); return…
JL.
  • 78,954
  • 126
  • 311
  • 459
3
votes
1 answer

What is the most efficient way to format strings with rounding and thousand separator in C?

So I have an inner loop situation with a buffer of floating point and integer values that are to be copied over to a another buffer in string format. What are my alternatives to round and insert a thousand separator when formatting strings? Whatever…
c00kiemonster
  • 22,241
  • 34
  • 95
  • 133
3
votes
1 answer

How do I overload notation without getting warnings and not using type classes?

First, without knowing much about type classes, it appears that type classes are the best way to overload notation for a type, unless I can't use type classes, or haven't figured out how. I'm not using type classes. Second, I'm pretty sure that I…
user2190811
3
votes
1 answer

How to use multiple locales using r.js and hbs.js

I have a project where I use require.js and hbs.js (require-handlebars-plugin), among others. Everything is working fine in my development environment, but after I optimized the project using r.js (requirejs optimizing), I have a problem. That is;…
3
votes
2 answers

How to set date locale in mailchimp?

I need to change the mailchimp locale *|DATE:M y|*. This gives Apr 2013 and I want Abr 2013 (Portuguese format). Is there any way to do this? Thanks!
VeYroN
  • 760
  • 9
  • 19
3
votes
1 answer

same locale, different output

I try to print UTF-8 string to windows console. The code page of console is set to 65001 (utf-8), the font is set to lucida console and the c++ source file encoding is utf-8 without bom. Consider the following…
cqdjyy01234
  • 1,180
  • 10
  • 20
3
votes
3 answers

Date/time formats for various countries

Is there any source on the web where I could find date and time formats used in individual countries in the World? I was checking languages listed in Control panel in Windows, but there are some countries missing (for example countries in Africa…
user20353
  • 1,293
  • 4
  • 15
  • 28