locale

Where can in find the locale objects for d3.js for different countries

旧城冷巷雨未停 提交于 2019-12-24 01:15:22
问题 this url (https://github.com/mbostock/d3/wiki/Localization) shows two examples for locales en_US: { "decimal": ".", "thousands": ",", "grouping": [3], "currency": ["$", ""], "dateTime": "%a %b %e %X %Y", "date": "%m/%d/%Y", "time": "%H:%M:%S", "periods": ["AM", "PM"], "days": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], "shortDays": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], "months": ["January", "February", "March", "April", "May", "June", "July",

Weird error with Locale.getISOCountries()

戏子无情 提交于 2019-12-24 00:43:30
问题 I'm using this code: for (final String code : Locale.getISOCountries()) { //stuff here } But on compile I get this error: [ERROR] Line 21: No source code is available for type java.util.Locale; did you forget to inherit a required module? And then a stack trace of compiler errors. I'm doing both of these imports at the beginning of the class: package com.me.example; import java.util.Locale; import java.util.*; What can be wrong? In Netbeans i see the autocomplete options and no syntax error

How to set the locale with symfony 3.4

久未见 提交于 2019-12-24 00:36:20
问题 How can I change the locale using symfony 3.4 (php)? I have the locale saved for each user in my database. Now on this page they explain that you should create an event listener to set the locale. But they only provide a method - in which class do I put this method and how do I wire it up using my services.yml? And if I'm in the service - how can I access my user object to actually get the locale I want to set? 回答1: Here is an example provided by the docs on how to create an kernel request

Reading Excel files in a locale independent way

孤街浪徒 提交于 2019-12-24 00:35:24
问题 I am using the following code to read data from various Excel files: // IMEX=1 - to force strings on mixed data // HDR=NO - to process all the available data // Locale 1033 is en-US. This was my first attempt to force en-US locale. string connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Locale Identifier=1033;Extended Properties=\"{1};READONLY=TRUE;HDR=NO;IMEX=1;\""; // source type according to the // http://www.microsoft.com/en-us/download/details.aspx?id=13255 // try

Is locale setting global in perl?

半城伤御伤魂 提交于 2019-12-23 21:11:10
问题 I'm debugging a perl script which looks like this (simplified): #!/usr/bin/perl use strict; use warnings; use Evil::Module; printf "%.3f\n", 0.1; This script outputs 0,100 (note , instead of . ). If I comment out the use Evil::Module statement, the output will be 0.100 . I believe that this is related to locale setting in the module. But locale is a lexical pragma (according to the manpage), and it's not used within the script. What's happening here? 回答1: The use locale pragma is lexical, but

How to format incomplete dates and times in a locale specific manner

流过昼夜 提交于 2019-12-23 16:07:20
问题 How can one format incomplete dates and/or a times in a locale specific manner? I have a date/time stored in a set of 7 strings: dayOfWeek - The day of the week. ([1,7]) dayOfMonth - The day of the month. ([1,31]) monthOfYear - The month of the year. ([0,11]) year - The year. ([-∞,∞]) hourOfDay - The hour of the day. ([0,11]) minuteOfHour - The minute of the hour. ([0,59]) meridianOfDay - The meridian of the day. ([0,1]) For various reasons, most of these are obtained through use of IR on web

XCode PhoneGap Localization

不问归期 提交于 2019-12-23 12:38:21
问题 I have been banging my head against the wall for 2 days trying add language-specific localization to my app. The App is using PhoneGap 1.1 and I am trying to build it up using XCode 4.1 I have been searching for infos/tutorial/whatever since 2 days now but I could not find anything detailed. So, either it's a trivial issue and I am failing at understing it, or it's an uncommon issue. Many threads I've seen explain that I have to create a new folder under "Resources" and add the following

Has C#/.NET builtin conversion routines for length units?

北城以北 提交于 2019-12-23 12:26:49
问题 Has C#/the .NET library builtin routines or constants for converting e. g. millimetres to inches? If so, where can I find them? (I just do not want to produce duplicate code again and again.) 回答1: No, there are no such build in routines or constants in the framework. 回答2: Totally gratuiitous off topic reply F# has built in support for units. This is a random blog I just Binged Units Of Measure In F# 回答3: Here's a CodeProject sample that does unit conversion: http://www.codeproject.com/KB/cs

How do I get the current “localized pattern” for the date and time of an std::locale

不羁的心 提交于 2019-12-23 10:28:25
问题 So far, I'm able to get the current locale, but I want to get the date format for that particular locale. Can this be done with the standard library. #include <locale> int _tmain(int argc, _TCHAR* argv[]) { // Print the current locale std::cout << std::locale("").name().c_str() << "\n"; // TODO: get the locale's date pattern, example for US it's (mm/dd/yyyy) std::cout << "date pattern: \n"; } 回答1: If you just want to cast a date to the corresponding string you can use std::time_put<char> :

C: What is the portable/safe(thread aware) way to convert a number to a string w/o locale settings?

懵懂的女人 提交于 2019-12-23 10:23:02
问题 What is the safe/portable way to convert a number to a string (and the other way around) ? I'm on Linux and my settings locale is so that when I use sprintf numbers have a "," instead of a "." as a separator. Sometimes I want them that way, Sometimes not :) I saw some solutions that imply playing with users settings. Clearly that's something one should not do. Somebody suggested using uselocale snprintf : simple way to force . as radix? can someone elaborate a bit (looks like it's buggy on