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

Force language code in django

I have a website with two languages. Turkish and English. I already setup django internalization with gettext. If browser request Turkish it translates to Turkish. If browser request English it translates to English. But i only want Turkish…
user884624
  • 123
  • 3
  • 7
3
votes
1 answer

get locale resource in bootstrap

I see lots of examples of people doing marvellous things starting with: $locale = $this->getResource('locale'); in their bootstrap. But though I have resources.locale.default = "nl_NL" resources.locale.force = true in my application.ini…
tihe
  • 2,452
  • 3
  • 25
  • 27
3
votes
1 answer

Notification uses default language and screen shows multiple languages while setting app language via AppCompatDelegate

We are currently facing some issues using AppCompatDelegate.setApplicationLocales() to set our app language. For example we call: AppCompatDelegate.setApplicationLocales(LocaleListCompat.forLanguageTags("fr")) when changing the language in our…
Aaron
  • 413
  • 5
  • 13
3
votes
0 answers

Convert character do date format (Catalan): abr22

I have the following dataframe: structure(list(mesos = c("abr22", "ag22", "des22"), Anual_2022 = c(66.8, 66.8, 66.8), decil1 = c(100.1, 100.1, 100.1)), row.names = c(NA, -3L), class = c("tbl_df", "tbl", "data.frame")) and I would like to convert…
Maria
  • 173
  • 7
3
votes
1 answer

mbrtowc() fails to convert when I'm using newlocale() and uselocale() instead of setlocale()

I would like to convert UTF-8 string wide character representation to work with the code points. To do this I call uselocale() on Linux to change the locale only for the current thread only. But for some reason it doesn't seem to do what I expect.…
Calmarius
  • 18,570
  • 18
  • 110
  • 157
3
votes
1 answer

What are the correct locale names on Windows?

I was trying to get the thousand separator used in Portuguese-speaking countries, on Windows, compiling my C code with GCC. For this, I was using locale.h's function setlocale(int category, const char* locale), and then…
Schilive
  • 187
  • 7
3
votes
2 answers

How do I find the Locale Identifier using the ISO country code (2 letters)

In my App I would like to display the correct currency code depending on the country the user is looking in: var isoCountryCode = "GB" let currency = Locale(identifier: isoCountryCode).currency?.identifier ?? "GBP" So instead of hard coding…
Daniel C
  • 113
  • 1
  • 8
3
votes
1 answer

Force Time::Piece strftime to use a specific locale

How can Time::Piece->strftime be forced to output weeks' and months' names according to a specific locale, and not according to the current locale? Setting $ENV{LC_ALL} to a specific locale (say, C.UTF-8) does not seem to work. The following test…
gioele
  • 9,748
  • 5
  • 55
  • 80
3
votes
0 answers

Matplotlib: change displayed decimal separator

I know this is actually an often asked question, but I can not find an answer to my specific question. Is there any possibility to change the displayed decimal separator only in matplotlib? I don't want to change any settings in locale, since I…
3
votes
0 answers

Android: Change language android 8(o), Activity resources not updated while app in the background

action:sendBroadcast ACTION_LOCALE_CHANGED: I registered the broadcast in the onCreate() for ACTION_LOCALE_CHANGED. Once broadcast receiver received and localeChanged() method will call. To get the changed locale using the below two APIs. A)…
3
votes
0 answers

How can I change the thousand separator of Plotly Sankey graph numbers?

I am looking for help in changing the thousands separator for numeric values in Plotly's Python distribution. I can change the default value format (".3s") to display comma-thousands-separated numeric values. I need a dot. import…
Naibaf
  • 417
  • 5
  • 15
3
votes
4 answers

How to use different url for same static page per locale in NextJS?

I am building a Next.js app with internationalization using next-i18next. // next-i18next.config.js module.exports = { i18n: { locales: ['lv', 'en', 'ua'], defaultLocale: 'lv', localeDetection: false, }, } For better SEO, I wold…
130db
  • 31
  • 4
3
votes
0 answers

How to execute windows commands (ipconfig,netstat) with specific locale/codepage using python

I want to parse to output of windows commands such as ipconfig, netstat, tasklist etc. using python. But certain part (Fixed) of output of these commands is returned based on current locale/codepage. E.g. in ipconfig output the string IP…
Rakesh
  • 271
  • 1
  • 2
  • 11
3
votes
1 answer

Locale dependent string sorting/comparison in JavaScript

Is there any way through which we can sort/compare string in JavaSciprt that are locale-dependent? Like java provides us, "java.text.Collator" class.
Zaki Imtiaz
  • 183
  • 1
  • 2
  • 16
3
votes
0 answers

Examples of locale-specific behaviour for Java BreakIterator's word and sentence splitters?

Java's BreakIterator class allows one to split a sentence into characters, words, and sentences according to the rules of a given locale. Can someone give me an example text string whose word and sentence boundaries are interpreted differently by…
Psychonaut
  • 859
  • 8
  • 22