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

How to change points to commas on axes in python

I added to my code import locale locale.setlocale(locale.LC_NUMERIC, "de_DE") plt.rcParams['axes.formatter.use_locale'] = True import matplotlib.pyplot as plt import numpy as np and it does not work locale.Error: unsupported locale setting I…
Lukáš Altman
  • 497
  • 1
  • 5
  • 15
3
votes
1 answer

Android context.getResources.updateConfiguration() deprecated how to resolve?

Just recently, context.getResources().updateConfiguration() has been deprecated in Android API 25 and I need to change language of my app which user selects. I am using this method to change language private void setLanguage(String language){ …
3
votes
1 answer

Changing Locale of a printstream in Java

I'm working on a project in which you can draw lines on a canvas and save it in a textfile with coordinates for each line. However, when I try to save it with this method, and write it to the textfile, all dots are replaced by commas. I assume this…
3
votes
1 answer

When subclassing textfield, locale is not picking up from storyboard

I have a UITextField which shows UIPickerView. To disable the edit menu, I subclassed UITextField and assigned it in the storyboard. But now the textfield is not changing the value according to change in locale. It always shows the value in English…
John Doe
  • 2,225
  • 6
  • 16
  • 44
3
votes
2 answers

Under what conditions does VoiceOver automatically switch language in an iOS app

My phone is set to en_us as system language, and I have added Swedish and French to the VoiceOver rotor languages. After adding the languages I find that the VoiceOver/Safari combo automatically starts in the appropriate language when browsing web…
Pacificana
  • 116
  • 9
3
votes
1 answer

Double accepted with comma instead of dot

I am unable to enter doubles value in my program from my bash terminal. Below is the code I used to figure out why it is happening. This is my code for the test: import java.util.*; public class DoubleTest { public static void main (String[]…
3
votes
1 answer

How can I display the date/time in multiple languages?

I would like to display the date and time (or either date or time, separately) in multiple languages. Specifically English and Spanish, but perhaps in other languages in the future. I've considered pythons time.strftime function in combination with…
Buttons840
  • 9,239
  • 15
  • 58
  • 85
3
votes
2 answers

display pandas dataframe with european formatting

I found answers on the question on how to load csv files with european formatting into pandas dataframes and display them in the US format (2,345.21). However how can I display floats saved in the US format in the european format (2.345,21) in…
Stephan
  • 113
  • 14
3
votes
2 answers

Polish locales in Angular 4+

I'm trying to set static locales of my angular 6 project. After changing everything correctly to the documentation it is still displaying en-US locales. main.ts import { NgModule, LOCALE_ID } from '@angular/core'; import { registerLocaleData } from…
BartusZak
  • 1,041
  • 14
  • 21
3
votes
2 answers

Why does the en_GB locale think the 1st of January is the 52nd week of the year?

It turns out that the week-of-year using ww as a java date format string is 52 for the 1st January 2011 when the locale is en_GB. Here is proof (using a scala REPL, though I could have done this using a Java program) First get my locales scala> val…
oxbow_lakes
  • 133,303
  • 56
  • 317
  • 449
3
votes
2 answers

Getting COleDateTime::Format to return "stycznia" instead of "styczeń" for Polish month "January"

I have this method to set the locale to Polish: void CMeetingScheduleAssistantApp::SetLocale() { // https://www.microsoft.com/resources/msdn/goglobal/default.mspx#ISO2 CString strLang[NUM_LANGUAGES] = { _T("plk") // Add…
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
3
votes
1 answer

Javascript date format not working correctly

I changed the code. I have this function: function Date(stringDate){ var date=moment(stringDate).locale('es').format('DD MMM'); if(date=="Invalid Date"){ return '-'; } else { return date; …
jdeveloper
  • 51
  • 3
3
votes
0 answers

Can we check if the locale output from boost::locale::generator::generate is invalid?

This is a 2-part question that began with me wondering: what happens if the ID input to boost::locale::generator::generate() was some invalid value? I checked the documentation and I couldn't find anything on what happens if we passed in something…
cechow
  • 170
  • 8
3
votes
1 answer

Get a code page for each locale in OEM and Ansi

How do I get the code page for each locale (not only for my locale)? I looking for a simple function in python / c# / c (prefer with python or c#) to found for each locale that I want what is the code page in Ansi and in OEM.
3
votes
2 answers

How to change Python extension locale in VSCode?

I can't figure out how to install the Python extension in VSCode in another language, specifically - I want it to be in English, but instead it is being installed in the language of my operating system, which is Russian. How can I install the Python…