locale

Is it possible to set the language or locale of a Windows program at runtime?

穿精又带淫゛_ 提交于 2020-06-25 10:45:12
问题 We have some existing software (C++ Windows applications) that have had their resources translated into a number of languages for various customers. The application picks up the locale from the Windows locale and runs in the appropriate language. Following a recent order, we translated the resources into German, however we have just found out that the customers are installing Windows in English, but want our software to still run in German. Apparently the rest of the software running on the

Can't configure locale in Docker image

前提是你 提交于 2020-06-16 07:27:24
问题 I'm trying to install a locale file in my Docker image, but for some reason it doesn't install correctly. These lines inside my Dockerfile do configure + install the locale files: # Install and configure locales RUN ["apt-get", "install", "-y", "locales"] RUN ["locale-gen", "nl_NL.UTF-8"] RUN ["dpkg-reconfigure", "locales"] RUN ["update-locale"] ENV LANG nl_NL.UTF-8 The image is created succesfully. When I run docker exec **ID** locale -a I still get the following error: locale: Cannot set LC

Can't configure locale in Docker image

点点圈 提交于 2020-06-16 07:26:02
问题 I'm trying to install a locale file in my Docker image, but for some reason it doesn't install correctly. These lines inside my Dockerfile do configure + install the locale files: # Install and configure locales RUN ["apt-get", "install", "-y", "locales"] RUN ["locale-gen", "nl_NL.UTF-8"] RUN ["dpkg-reconfigure", "locales"] RUN ["update-locale"] ENV LANG nl_NL.UTF-8 The image is created succesfully. When I run docker exec **ID** locale -a I still get the following error: locale: Cannot set LC

Are there locales or common programs that use YYYY-DD-MM as the date format?

大兔子大兔子 提交于 2020-06-11 17:08:38
问题 I've often standardized on YYYY-MM-DD as the date format for communicating within a geographically distributed project teams to dispel any ambiguity that might arise from local date formats. Is it likely that I might run into people who are used to seeing dates as YYYY-DD-MM ? Are there programs that use this as a date format? 回答1: See "Calendar date" on Wikipedia on the topic - it lists the countries by date/time format. At first glance it doesn't look like anyone is using YYYY-DD-MM

Are there locales or common programs that use YYYY-DD-MM as the date format?

天涯浪子 提交于 2020-06-11 17:06:55
问题 I've often standardized on YYYY-MM-DD as the date format for communicating within a geographically distributed project teams to dispel any ambiguity that might arise from local date formats. Is it likely that I might run into people who are used to seeing dates as YYYY-DD-MM ? Are there programs that use this as a date format? 回答1: See "Calendar date" on Wikipedia on the topic - it lists the countries by date/time format. At first glance it doesn't look like anyone is using YYYY-DD-MM

Does C++ support converting between character encodings other than UTF-8, UTF-16, and UTF-32?

浪子不回头ぞ 提交于 2020-05-25 08:01:12
问题 I understand that std::codecvt<char16_t, char> in C++11 performs conversion between UTF-16 and UTF-8, and std::codecvt<char32_t, char> performs conversion between UTF-32 and UTF-8. Is it possible to convert between, say, UTF-8 and ISO 8859-1? Consider: const char* s = "\u00C0"; If I print this string and my terminal's encoding is set to UTF-8, I will see the character À . If I set my terminal's encoding to ISO 8859-1, however, printing that string will not print out the desired character. How

Does C++ support converting between character encodings other than UTF-8, UTF-16, and UTF-32?

ぃ、小莉子 提交于 2020-05-25 08:01:11
问题 I understand that std::codecvt<char16_t, char> in C++11 performs conversion between UTF-16 and UTF-8, and std::codecvt<char32_t, char> performs conversion between UTF-32 and UTF-8. Is it possible to convert between, say, UTF-8 and ISO 8859-1? Consider: const char* s = "\u00C0"; If I print this string and my terminal's encoding is set to UTF-8, I will see the character À . If I set my terminal's encoding to ISO 8859-1, however, printing that string will not print out the desired character. How

JDK not localizing JComponent [duplicate]

扶醉桌前 提交于 2020-05-17 08:49:18
问题 This question already has an answer here : JFileChooser On Java 11 , Problem Of Translation to French (1 answer) Closed 7 days ago . I'm using JDK 13 for a Swing application but it won't show localized buttons for JOptionPane : public class test { public static void main(String... args) { Locale locale = Locale.forLanguageTag("es-MX"); Locale.setDefault(locale); // JOptionPane.setDefaultLocale(locale); // System.out.println(JOptionPane.getDefaultLocale()); JOptionPane.showConfirmDialog(null,

Java - NumberValue to String without Currency sign

♀尐吖头ヾ 提交于 2020-05-15 10:08:06
问题 I am trying to format a NumberValue as a String in the current locale format. For example, for Locale.Germany these would be the results I am trying to get: 1 -> 1,00 1.1 -> 1,10 0.1 -> 0,10 What I have tried: String test1 = NumberFormat.getInstance().format(1.1); // -> 1,1 String test2 = NumberFormat.getCurrencyInstance().format(1.1); // -> 1,10 € How could I get the same format as the second example, without the currency symbol? Or alternativly, how could I make sure the result from the

Negative floating point numbers are not sorted correctly using awk or sort

南笙酒味 提交于 2020-05-11 12:54:26
问题 For some reason, comparisons of negative floating point numbers with awk and sort seem to be broken on my machine. It seems that -0.1 < -0.2 . When I try to sort 0.2 -0.1 -0.2 0.1 0 using sort -n test.dat , I get -0.1 -0.2 0 0.1 0.2 instead of -0.2 -0.1 0 0.1 0.2 What is wrong with me? 回答1: Answer: You are French! In french, the decimal point is a comma ( , ) and not a dot ( . ). You need to either replace the dots with commas or change your locale. Try LC_NUMERIC=us_EN.UTF-8 sort -n test.dat