5,315 questions
4
votes
1
answer
190
views
Why can't chrono::parse parse a POSIX date and time string?
I'm trying to use the <chrono> library to parse a POSIX date and time string, no matter what the global locale is, based on this code:
#include <iostream>
#include <locale>
#include &...
1
vote
0
answers
85
views
wp_set_script_translations loads the wrong language
I have a website, that loads some scripts with translations. On the dev environment everything works great, but on the stageing, the wrong language is loaded.
Just before wp_set_script_translations I ...
0
votes
0
answers
149
views
How to convert a scientific notation string to normal string
I have a below program which is reading and displaying decimal numbers.
import java.math.*;
import java.text.DecimalFormat;
import java.text.ParseException;
public class Main {
public static void ...
2
votes
0
answers
93
views
Can I easily parse datetimes independently of my machine?
In python I like the datetime module of the standard library to parse timestamps.
However, some of the format codes depend on the locale set for the machine where it's run, which makes the code ...
1
vote
0
answers
117
views
what locale does grep use if no environment variable explicitly sets it?
In case this is relevant: I'm using Git Bash for Windows but NOT the usual mintty launcher (I'm running bash directly), so I have fewer environment variables set than "normal". In ...
-1
votes
1
answer
48
views
Decimal separator not changing when importing data from excel and when applying mean to groupby
I am importing some excel data with different column types. One of them is float and while the decimal separator in excel is a comma, a dot is imported.
What is more, when i do a groupby.mean on some ...
0
votes
0
answers
70
views
Strange string comparison using different locales (C and en_US.utf8)
I compared strings with en_US.utf8 locale and found a strange behavior.
Let's take:
std::string a = "A";
std::string b = "a";
C locale (default one) says that a < b, when utf8 -...
0
votes
0
answers
47
views
QFontDialog shows fonts for unsupported locale
My laptop is on Gentoo Linux KDE with Qt 5.15.2, and I have English locales as well as Russian.
However, when I tried to run QFontDialog (native dialog) I got a font name Noto Rashi Hebrew. And so ...
1
vote
1
answer
143
views
Difference in initialization of a Locale object
Is there any difference between this two ways of creating a Locale :
Locale uk = Locale.UK;
Locale en_uk = new Locale("en", "UK");
The only difference I have noticed so far is ...
2
votes
2
answers
950
views
Whats the point of Locale in DateTimeFormatter?
Given the following code
LocalDate localDateEpoch = LocalDate.parse(
"01-Jan-2017", DateTimeFormatter.ofPattern("d-MMM-yyyy", Locale.FRENCH));
System.out.println("...
1
vote
0
answers
38
views
Why can't the comm command tell the difference between ✓ & ⨯ when LANG=en_US.UTF-8?
If I have two files, a.txt containing:
meow ✓ bar
and b.txt containing:
meow ⨯ bar
Why can't the GNU Coreutils command comm tell the difference between the two when $LANG is set to a UTF-8 encoding?
...
0
votes
1
answer
447
views
Next.js internationalisation: all the routes throws "404 not found" for only one locale while I can access the other locale's routes
I'm currently figuring out how the Next.js localisation and internationalisation work.
beside the root page.jsx (home page), I have two folders: test and tester -sorry for the confusion- and two ...
2
votes
3
answers
598
views
Change app language/locale programmatically in jetpack compose during instrumentation/UI test on Android
The app supports 2 locales. During instrumentation or UI test, I want to test with a specific language (such as EN). Referring 6629458, I made a function for changing the locale in kotlin:
private fun ...
0
votes
3
answers
63
views
How to reuse string from library with Flutter
When working with Android (Kotlin) there are many strings that are used many times, I package them in a library (carefully translated into many different languages).
When I need to use it, just add ...
-1
votes
5
answers
282
views
Javascript date to locale string not correctly display
I tried to display date in LAO PDR ພາສາລາວ format but not works.
According to text
my code is
// 4.6.2024, 23:26:55 this de (German is correct)
console.log(new Date().toLocaleString("de"));
// ...
1
vote
3
answers
122
views
How to convert to float a string array with multiple locale?
In Python, I have an array with float numbers expressed as strings with multiple locales.
E.g.:
str_array = ['1,234.56', '7.890,12', '123 456,789']
I would like to convert all of them to float, and ...
0
votes
0
answers
152
views
.po files not found when importing the file under Drupal locale
I have ... /admin/config/regional/translate/import
I can locate the po-file on my PC under H:\wamp\www\locale\fr_BE\LC_MESSAGES and select the languauge fr_BE.
The po. and mo-file have been prepared ...
1
vote
0
answers
59
views
Activity recreating on first locale change
I am using this code to change app locale
AppCompatDelegate.setApplicationLocales( LocaleListCompat.forLanguageTags(languageCode) )
and also adding
android:configChanges="locale|layoutDirection|...
2
votes
1
answer
58
views
French weekdays in R
If I type:
Sys.setlocale("LC_TIME", "fr_FR.UTF-8")
data.frame(day_number=1:7) %>%
mutate(day_of_week = wday(day_number, label = TRUE))
Then the first day of the week ...
1
vote
1
answer
253
views
Flutter Localizations.localeOf(context) countryCode is always null
Localizations.localeOf(context) gives the correct langaugeCode but the countryCode is always null. Somehow, could not get references for this.
Locale currentLocale = Localizations.localeOf(context)...
-1
votes
2
answers
172
views
angular calendar scheduler dont show minutes in hour column
Im using angular-calendar-scheduler to create a calendar view with my events.
First of all, i added it in my core.module and set the locale to en and en_US.
registerLocaleData(localeEn);
export ...
1
vote
0
answers
98
views
how to format column in currency in python
locale.setlocale(locale.LC_ALL, 'pt_BR.UTF-8')
filtered_data['Receita Total'] = filtered_data['Receita Total'].apply(lambda x: locale.currency(x, grouping=True))
filtered_data['Margem Final'] = ...
0
votes
1
answer
286
views
Trouble adding support for mulitiple locals NixOS
Running latest stable NixOS
I am trying to add support for my 2nd language using the i18n.supportedLocales option in my configuration.nix file.
i18n.supportedLocales = [
"ko_KR.UTF-8/UTF-8&...
2
votes
1
answer
111
views
Formatting very large numbers to local settings in javascript
I saw the question here How can I format big numbers with toLocaleString? but this doesn't exactly answer the questino I have.
I'm using the library provided by https://github.com/royNiladri/js-big-...
3
votes
1
answer
152
views
Remove grouping from numpunct of std::locale
I'm unsuccessfully trying to strip grouping (thousands separator) from std::locale.
I need to strip it from locale set in OS (for example sk_SK locale) but retain all others locale dependent ...