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

Intl.NumberFormat Get the Currency Code from a Dynamic Locale?

I am struggling to find a good way to get the Currency Code for Intl.NumberFormat from my locale. We have the ability for the user to change locale at any time. I need a way to retrieve the currency code based on the selected locale so that I can…
phattyD
  • 205
  • 3
  • 11
3
votes
2 answers

How get digits after the decimal points in NumberFormat?

Looking for solution to get full currency value including pennies. numberingSystem: 'fullwide' coming with letter spacing when getting full digits. Is there any option to get full digit with currency code in NumberFormat() ? Expected behaviour:…
Mo.
  • 26,306
  • 36
  • 159
  • 225
3
votes
0 answers

How to parse floats in a local format without changing the current locale?

How to parse floats in Python from a source which uses a special known local format that has commas as decimal separators? locale can do that, of course. But its documentation says: It is generally a bad idea to call setlocale() in some library…
Amaterasu
  • 153
  • 10
3
votes
1 answer

Usage of iconv function in R to transliterate German words

I am trying to use the iconv function in R to achieve the correct transliteration of German words (for example, Möbel → Moebel). I have written the following code (tried with English/German locales): iconv("Möbel", "latin1", "ASCII//TRANSLIT") [1]…
manro
  • 3,529
  • 2
  • 9
  • 22
3
votes
2 answers

how to set specific font family for each locale in jetpack compose

In Jetpack Compose, you can set your specific font by editing the type file: val MyFont= FontFamily( Font(R.font.myfont, FontWeight.Normal) ) // Set of Material typography styles to start with val Typography = Typography( body1 =…
3
votes
3 answers

Warning messages with Locale::Maketext::Simple

I get these warning messages when I start my program: Name "AAT::Translation::I18N::en_us::Lexicon" used only once: possible typo at /usr/share/perl/5.12/Locale/Maketext.pm line 404. Name "Win32::Locale::Lexicon" used only once: possible typo at…
sebthebert
  • 12,196
  • 2
  • 26
  • 37
3
votes
2 answers

setting components' locale is unsuccessful

I need my application to set programmatically a locale of all the sensitive components, like JTextFields and JTextAreas. Also I have date information (month written as a word) which is locale-sensitive too. I wrote the following code, but it…
ilja
  • 95
  • 8
3
votes
0 answers

How to set locale in postgres using docker-compose?

I've tried multiple ways of changing the locale to en_GB and nothing seems to work. My current docker-compose.yml version: '3.9' services: db: image: postgres restart: always build: context: . dockerfile: ./Dockerfile …
Robert Jamborski
  • 183
  • 2
  • 13
3
votes
2 answers

GETTEXT function does not tranlsate page on local PhpStorm dev server

I found two approaches to get gettext working in PHP but neither seems to work. How do I make the translated h1 tag visible. The ouput should be Willkommen (Welcome in german = Willkommen). Gettext seems to be installed properly. The only output I…
Artur Müller Romanov
  • 4,417
  • 10
  • 73
  • 132
3
votes
1 answer

toLocaleDateString() - issue with Norwegian

I have an issue with getting locale datestring correctly formatted. It suddenly stopped working for Norwegian. I've tried 'no-NO' and 'nb-NO'. Any ideas about what could be causing this? I'm stuck. Example: console.log(new…
Erik Erik
  • 45
  • 5
3
votes
3 answers

Indian Style thousand separator in ggplot2 chart axes

Indian style thousand separators are used like this. First separator at 3 digits (thousands) but thereafter separator at every two digits. 1 10 100 1,000 10,000 1,00,000 10,00,000 1,00,00,000 10,00,00,000 I know that I can change/format axes in…
AnilGoyal
  • 25,297
  • 4
  • 27
  • 45
3
votes
0 answers

android.icu.text.DecimalFormat resets monetary separators

First of all, like the title says, this is about android.icu.text.DecimalFormat, and not java.text.DecimalFormat. I'm using DecimalFormat to get decimalFormatSymbols.monetaryGroupingSeparator and decimalFormatSymbols.monetaryDecimalSeparator, and…
tasegula
  • 889
  • 1
  • 12
  • 26
3
votes
0 answers

Boost locale cannot be used with std::regex

It seems that Boost.Locale cannot be used with std::regex. See the code below: #include #include int main() { try { boost::locale::generator gen; std::locale de_DE(gen("de_DE.UTF-8")); …
josuegomes
  • 451
  • 4
  • 15
3
votes
2 answers

How to get only the timeZone name in JavaScript?

I already tried the codes below, but they don't work because they include Date and\or Time. I need to get only the timezone name. (OBS: timezone name, not IANA Time Zone) Is it possible to force toLocaleString() to show timeZoneName "short" and…
user
  • 43
  • 5
3
votes
2 answers

Indian short currency format in google sheets

In google sheets, I am trying to display numbers in Indian 'short' format with lakhs and crore suffix as follows: Cell value: 1234, Display as 1.23K Cell value: 12345, Display as 12.35K Cell value: 123456, Display as 1.23L [L=lakh] Cell value:…
icru
  • 31
  • 1