5,315 questions
Advice
1
vote
7
replies
76
views
Why does PHP on Windows allow a non-existent locale to be set?
If I run var_dump(setlocale(LC_ALL, 'xyz.utf-8'));
on Windows I get string(9) "xyz.utf-8" despite the fact that 'xyz' is not advertised in ResourceBundle::getLocales('') and having ...
0
votes
0
answers
51
views
Date & time not being shown in japanese
I am using IBM MQ on a Windows 11 machine that was originally installed with the Japanese language pack—in other words, unlike the typical en-US installation, mine came with Japanese as the default. ...
4
votes
1
answer
113
views
Are spelling variations of encoding identifiers for "setlocale" standardized or documented?
This question has to do with syntactic conventions for string encoding identifiers in locale names passed to setlocale in C, focusing on the particular example of UTF-8. My preliminary observation is ...
25
votes
13
answers
3k
views
How can I parse a string to a float in C in a way that isn't affected by the current locale?
I'm writing a program where I need to parse some configuration files in addition to user input from a graphical user interface. In particular, I'm having issues with parsing strings taken from the ...
4
votes
1
answer
134
views
Purpose of "variant" in Java Locale
The Locale class in Java can accept 3 arguments: language, country and variant.
The first two are self-explanatory. However, I don't understand the purpose of the variant argument.
This is the ...
0
votes
0
answers
71
views
How does spring-boot 3.5.0 evaluate which java.time.format.ResolverStyle to be used depending on the local?
I have a Restcontroller with a parameter with a LocalDate like this:
@RequestParam @Schema(requiredMode = REQUIRED) @NonNull final LocalDate startDate
When calling the endpoint with a Swedish ...
0
votes
1
answer
39
views
Flutter TextField right-click menu cannot be changed to Simplified Chinese
I tried to change the language but it didn't work. My computer language is Simplified Chinese.
//pubspec.yaml
dependencies:
flutter_localizations:
sdk: flutter
//main.dart
import 'package:...
1
vote
2
answers
111
views
Is setlocale() in C restricted to locales shown by “locale -a”?
It seems like setlocale() in C (at least on Linux) only works if the locale you’re trying to set it to is one of those listed in the output of locale -a. Is this really true?
The reason I ask to ...
0
votes
1
answer
91
views
Optional {locale} in routes messes up controller arguments (Laravel 11)
I have a project in laravel 11 and there are some issues with my config.
The site should support optional locale param to differentiate between default and custom language:
DE: https://example.com/...
0
votes
2
answers
139
views
Locale.Language - how to differentiate between regions
I have the following code:
if let index = currentLanguages.firstIndex(where: { $0.languageCode == language.languageCode }) {
currentLanguages.remove(at: index)
} else {
...
0
votes
0
answers
57
views
Getting System.Configuration.ConfigurationErrorsException on windows with Japanese locale
I'm getting an exception while running my executable on windows with a Japenese locale. The same executable works well in an English locale.
Here is the stack trace I am getting:
See the end of this ...
1
vote
1
answer
134
views
Automatically adjust Date arguments\format in another locale\language
I have English Office. Building a macro that builds a string using dates:
Range("G2").Formula = "=TEXT(TRIM(F2),""dd.MM.yyyy"")"
Range("G2:G" & ...
0
votes
1
answer
172
views
Why does changing the in app language work on some devices but not others
I can change the language locale on my Galaxy S23 Ultra, but when I try on my Galaxy A14 5g, the language remains the same. They are both running Android 14. I don't understand what I am doing wrong. ...
0
votes
1
answer
165
views
Flutter speech_to_text Locale Issue: Android Emulator Supports Japanese, But Pixel Defaults to English
I'm building a Flutter app that uses the https://pub.dev/packages/speech_to_text v6.6.2 package for speech-to-text functionality. My app works perfectly with Japanese (ja-JP) voice input on the ...
0
votes
0
answers
38
views
How to change a langauge without deprecated updateConfiguration() method Java Android studio
I am doing this mobile app in Java and I want to have language selection. I managed to this in way below, but I don't want to use deprecated updateConfiguration() method, but I couldn't find working ...
1
vote
1
answer
209
views
Flutter Formatter for TextFormfield for currency, without locale
I have a list of currencies, with all the settings I could think of:
{
"code": "USD",
"name": "United States Dollar",
"symbol": "\$&...
1
vote
0
answers
52
views
How to get BCP-47 locale in Python on Windows?
According to Microsoft's documentation Windows has used IETF BCP locale names since Vista (in other words, they should be used on all currently-supported versions of Windows). These names typically ...
3
votes
3
answers
298
views
SimpleDateFormat working on Non-English Locale(Nepali or Devnagari)
I am having confusion on understanding the following piece of code:
public static void main(String[] args) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
...
1
vote
1
answer
128
views
Localization affecting the output of Powershell Get-Date command
I am trying to call Powershell Get-Date command within the batch script. Here is my batch script:
@echo off
setlocal EnableDelayedExpansion
set myFormat=dd/MM
set locale_independent_get_date=...
1
vote
1
answer
325
views
Upgraded Angular -11 to 17, Now DateTimeAdapter (OwlMomentDateTimeModule) Failing on dateTimeAdapter.localeChanges.subscribe
I upgraded from Angular 11 to 17. If I comment out in HTML my OwlDateTimePicker, the app loads fine. Is it really possible the OwlMomentDateTimeModule Moment Adapter just doesn't implement the ...
0
votes
1
answer
83
views
Flutter get Locale from RevenueCat
I am (happily) using RevenueCat, everything is working perfectly fine.
BUT now I would love to get the users locale, or more specific, the users AppStore locale.
Is there any way to get this from ...
0
votes
2
answers
63
views
How to display counter text in English for TextInputLayout in a multilingual Android app
Description:
I'm using a TextInputLayout with TextInputEditText to allow users to enter text in my Android app. I've enabled the character counter with a maximum length of 500, so as the user types, ...
2
votes
1
answer
108
views
Why can't I get C++ date formatting to be different in different locales?
This program should, I think, produce different results if in a different locale:
#include <chrono>
#include <iostream>
#include <locale>
using namespace std;
int main(int, char *...
3
votes
2
answers
269
views
Dev C++ Locale only working while using system's locale and not when specifing name
When using setlocale() to change the locale of the program to Italian, the code works as expected only when using setlocale(LC_ALL, "") and not when using setlocale(LC_ALL, "it-IT")...
0
votes
1
answer
618
views
Ansible Playbook Not retaining "locale" settings: LC_ALL and LANG empty
I'm experiencing an issue with Ansible playbook where the locale settings do not seem to be retained on the target host. I'm running a playbook with task that will register as output a date. It used ...