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

Android - keyboard covering EditText in Arabic / RTL

I have a multilingual app in which I want the EditText to slide up (with the rest of the screen) when the user clicks on it, i.e. the EditText should always be visible above the keyboard, whenever the keyboard is displayed. Obviously this is doable…
3
votes
2 answers

Java regex : Case insensitive matching for non English characters

I am trying to perform case insensitive matching with Pattern and Matcher classes in Java, for Russian language. Below is the text: "some text газированных напитков some other text" Below is the Pattern I am using to match the text: Pattern pattern…
Darshan Mehta
  • 30,102
  • 11
  • 68
  • 102
3
votes
0 answers

Android locale currency symbol error

I'm trying get currency symbol based on where is user located (what language he have in smartphone). I'm using this code String currency = Currency.getInstance(Locale.getDefault()).getSymbol(); On my phone Xiaomi Redmi 4 Prime it works. I tested…
Šimon Marko
  • 69
  • 1
  • 11
3
votes
1 answer

Where can I find a good introduction to locales

I have to write some code working with locales. Is there a good introduction to the subject to get me started?
David Thielen
  • 28,723
  • 34
  • 119
  • 193
3
votes
1 answer

Creating DateTime from pattern provided by intl extension PHP

I have a project where date could be entered in different formats by locale for example: english format: 17/04/2017 korean format 17. 4. 24. I get this data as a string in php. I need this string to be converted to DateTime object somehow. when I…
Einius
  • 1,352
  • 2
  • 20
  • 45
3
votes
1 answer

java Locale.Builder setExtension(Locale.UNICODE_LOCALE_EXTENSION

I have been trying to get Java to convert numbers according to their locales. Came across this post which helped in a big way since pre understanding this I had devised own methods to convert numbers to specific locales (as per other confusion…
V H
  • 8,382
  • 2
  • 28
  • 48
3
votes
1 answer

How to create date from locale value string?

How do I create a date from a non-English language? When using an English formatted string, the date returns a valid date. var value = "3 mei, 2017 - 11:36"; //var format = 'd MMMM, yyyy - hh:mm'; var d = new Date(value); When using a…
Peter Raeves
  • 516
  • 1
  • 4
  • 17
3
votes
5 answers

How to parse HH:mm into amount of minutes considering locale time separator?

I have an input string of 'HH:mm' format where time separator is according to locale settings (e.g. '10:45' for US or '10.45' for Italy). I need to convert it into amount of minutes. Here is what I came up with: String timeSeparator =…
Lega
  • 88
  • 8
3
votes
0 answers

Burmese font in Android

We have existing Android application, now we are planning to add language support for Myanmar(Burmese). We just realized that Burmese script can be written in 2 ways Zawgyi Unicode But we can have either one of the string inside values-my folder.…
Karthi Ponnusamy
  • 2,031
  • 2
  • 25
  • 41
3
votes
1 answer

Rails: Setting locale appropriately to IP address

I am trying to use request.location (geocoder gem), to set the locale appropriately to the clients IP address. This is what I've got: app/controllers/application_controller.rb before_action :set_locale private def set_locale # get location…
heroxav
  • 1,387
  • 1
  • 22
  • 65
3
votes
2 answers

Win1251->UTF16 conversion

I have a dll-project, written in Windows-1251 encoding, and I need my dll's output encoded in UTF-16. I use the following function to do conversion: ptr = MultiByteToWideChar(CP_ACP, 0, str, -1, wbuff.getBuffer(), len); Unfortunately,…
Roman Dobrovenskii
  • 935
  • 10
  • 23
3
votes
1 answer

SetThreadLocale for the entire Delphi application

My Delphi (XE 10) program uses nonunicode (single byte) legacy Firebird database (character set NONE) and therefore its data (that are read from or saved into database) depends on the windows Locale for the nonunicode programs. Depending on this…
TomR
  • 2,696
  • 6
  • 34
  • 87
3
votes
2 answers

webapp2 routes for locale in URL

The webapp2 i18n documentation has an example of specifying the locale in a parameter, e.g.: www.example.com?locale=en_US but Google search console says that this is not recommended. I'd like to instead put the locale in the URL like…
new name
  • 15,861
  • 19
  • 68
  • 114
3
votes
2 answers

How to Make a Spinner (In a Fragment) That Changes the App's Language?

My app was almost fully complete when I realized I needed to use fragments instead of activities in order to share the same Navigation Menu across all of the screens, so now I'm in the process of making all of my activity java code work in…
CoolBeener
  • 43
  • 4
3
votes
1 answer

Determine country code for iOS Region "Europe"

I am working on an app which asks users for phone number and has a country picker, where the user should input country code. But while testing null country code values, I found out that somehow my iPhone with iOS 10.2.1 has a region format set to…
Blackbeard
  • 652
  • 2
  • 8
  • 22