4
голосов
4ответов
8605 просмотров

Facebook FQL user table `sex` field : how to return male/female even the user is using different locale?

Situation: my facebook application ( http://apps.facebook.com/mymagicmirror/ ) needed to detect user's gender, and then query opposite sex or male or female FQL: SELECT uid, name, pic, sex FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1='.$user_id.') and sex='male' Problem: When t...

2
голосов
1ответов
222 просмотров

.NET counterpart of Java's locale's variant: does it exist?

Are there localisation mechanisms available under .NET (out of the box) that support something like Java's locale's variant? Beside the language and country I would like to be able to have a variant, say, per users' domain. My users represent various domains and their vocabulary varies. I was try...

0
голосов
1ответов
200 просмотров

Supporting limited number of currencies in Cocoa(Touch)

Early versions of our app will only support a limited number of currencies. If a user should try to use our app with an unsupported currencyCode then I'd like to set the currencyCode to one that is supported. I'm getting myself confused bouncing between NSNumberFormatters, currencyCodes, NSLocale...

22
голосов
6ответов
25262 просмотров

Grails how to change the current locale

How can I change the current locale ? I tried to put controller/action?lang=de but my locale is still en_US I tried to override the value using this piece of code: def key = "org.springframework.web.servlet.DispatcherServlet.LOCALE_RESOLVER" def localeResolver = request.getAttribute(key) loca...

3
голосов
1ответов
2032 просмотров

Why is nl_langinfo(CODESET) different from locale charmap?

This post originated from How do you get what kind of encoding your system uses in c/c++? I tried using nl_langinfo(CODESET) but I got ANSI_X3.4-1968 instead of UTF-8 (which is what I get when typing: locale charmap). Am I using nl_langinfo() wrong? How should I use it?

4
голосов
1ответов
1292 просмотров

Locale-aware Perl regular expressions (matching word boundaries)

I'm currently somewhat stuck getting a regular expression in Perl (taken from an earlier question of mine) to match word characters from a non-ASCII locale (i.e., German umlauts). I already tried various things such as setting the correct locale (using setlocale), converting data that I receive ...

0
голосов
1ответов
2796 просмотров

C# sort list of strings with specific scandinavian culture in mind

i have a list of country names. Now i want to sort them alphabeticly, with the users culture in mind. I have the 4 scandinavian cultures norway, sweden, danmark en finland. For sweden, the Ö (O with two dots if it's not printed correctly) must appear at the end, after the Z, but for danmark it's...

11
голосов
2ответов
751 просмотров

Are there any updates of localization support in C++0x?

The more I work with C++ locale facets, more I understand --- they are broken. std::time_get -- is not symmetric with std::time_put (as it in C strftime/strptime) and does not allow easy parsing of times with AM/PM marks. I discovered recently that simple number formatting may produce illegal U...

4
голосов
4ответов
2671 просмотров

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

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.)

0
голосов
3ответов
193 просмотров

Special Characters in non english languages

How can I generate a text file containing all character codes in a specific locale for example 1029 Czech. I basically want to generate a list of every character that exists in their alphabet?

0
голосов
3ответов
2746 просмотров

How to set DB2 ODBC driver locale?

I want to import data from a DB2 database into MS Access via ODBC. The connection is set up and working but decimal values get converted due to some locale issue (German Windows). 234.75 ends up as 23475 in the Access table. I had the same issue with Oracle but was able to fix it by setting the...

0
голосов
2ответов
2800 просмотров

Encoding issue under Groovy

I am developing an application which should work under different languages (german, spanish, etc). The application uses an Oracle DB. I have CRUD business processes and I have the standard views (create, edit, show, list). No problems for creating, showing and listing any record containing specia...

11
голосов
7ответов
30276 просмотров

Is there a way to get a timeZone with (only) a country code (valid ISO-3166 code)?

I'm trying to get a TimeZone for a user. For this I have a country code which is a valid ISO Country Code. These codes are the upper-case, two-letter codes as defined by ISO-3166. You can find a full list of these codes at a number of sites, such as: http://www.chemie.fu-berlin.de/diverse/doc/I...

3
голосов
1ответов
945 просмотров

How to format numbers according to locale in Haskell?

In Python I can use locale.format to pretty-print numbers according to locale setting: >>> import locale >>> locale.setlocale(locale.LC_ALL, "en_US.UTF-8") 'en_US.UTF-8' >>> locale.format("%.2f",1234567.89,grouping=True) '1,234,567.89' How can I do the same in Haskel...

3
голосов
2ответов
1518 просмотров

Convert NSString with a number to appropriate phone number localization format

NSString *phoneNumber = @"2310234432"; I would like to create a new string out of the above but format the phone number according to the current localization. Is there a "native" way I can do this or do I have to write my own methods to return it for every locale ? Thanx

9
голосов
4ответов
3324 просмотров

locale-dependent ordering for std::string

I am trying to compare std::strings in a locale-dependent manner. For ordinary C-style strings, I've found strcoll, which does exactly what I want, after doing std::setlocale #include <iostream> #include <locale> #include <cstring> bool cmp(const char* a, const char* b) { ...

2
голосов
3ответов
324 просмотров

Does the formatting of a date depend on both the user's locale and calendar system?

I feel this question is very general for all programmers on all languages. This is somewhat blurry. First, there are locales, which encapsulate cultural information and other stuff. I believe these locale objects also encapsulate information about date and time formatting, i.e. how to display a d...

1
голосов
1ответов
530 просмотров

Java Locale issue in vendor Applet

I have a vendor Applet that is trying to use no longer supported locale settings. De compiled Code is as follows String s1 = System.getProperty("java.version"); String s2 = System.getProperty("user.language"); String s; if(s1.regionMatches(true, 0, "1.4", 0, 3)) s = System.getPr...

19
голосов
2ответов
34950 просмотров

Java Date Format for Locale

How can I find the DateFormat for a given Locale?

15
голосов
4ответов
4865 просмотров

Java's equalsIgnoreCase fails with ß ("Sharp S" used in German alphabet)

my first question here :-) Did my best reading the rules and searching if the question was already asked before. The following code String[] strings = {"cAsE", "\u00df"}; for (String str : strings) { System.out.println(str.equalsIgnoreCase(str.toLowerCase())); System.out...

22
голосов
8ответов
14721 просмотров

Locale-independent "atof"?

I'm parsing GPS status entries in fixed NMEA sentences, where fraction part of geographical minutes comes always after period. However, on systems where locale defines comma as decimal separator, atof function ignores period and whole fraction part. What is the best method to deal with this issu...

5
голосов
2ответов
3439 просмотров

Is it allowed to have several title tags in html?

I was looking at the title tag http://www.w3schools.com/TAGS/tag_title.asp So would it be legal if I had several titles with different lang IDs?

12
голосов
2ответов
4222 просмотров

Is Culture in C# equivalent to Locale in Java?

C# uses the concept of Culture. Is this operationally similar to Locale in Java or are there significant differences in the underlying concepts?

2
голосов
5ответов
947 просмотров

Strategy for locale sensitive sort with pagination

I work on an application that is deployed on the web. Part of the app is search functions where the result is presented in a sorted list. The application targets users in several countries using different locales (= sorting rules). I need to find a solution for sorting correctly for all users. I...

0
голосов
2ответов
10728 просмотров

How to set locale in a custom Struts 2 ActionMapper

I have implemented a custom ActionMapper which obtains the locale from the URI (the URI itself, not the request parameters). From within ActionMapper.getMapping(), how do I set the locale for the current action? Here are some ideas I've considered: ActionContext.getCurrent().setLocale(). Unfor...

15
голосов
4ответов
15782 просмотров

OS locale support for use in Python

The following Python code works on my Windows machine (Python 2.5.4), but doesn't on my Debian machine (Python 2.5.0). I'm guessing it's OS dependent. import locale locale.setlocale( locale.LC_ALL, 'English_United States.1252' ) I receive the following error: Traceback (most recent call last)...

2
голосов
1ответов
1172 просмотров

jQuery tablesorter month name locale

Using the jQuery tablesorter plugin . I wonder how could I make it work with dates in the full format: "Jan 21, 2009 16:00" Problem is that when that date (a string) has been localized with user current locale "gen 21, 2009 16:00" Do I have to write a custom sorter for each locale? ...

0
голосов
1ответов
282 просмотров

Multi-lingual Drupal Site

This is my situation: I have two languages, namely English and German. However, I have several countries that should have different content. E.g. US, UK etc. Now, with i18n you can only have ONE english translation and one german translation. What is the best way to handle translating nodes in ...

24
голосов
5ответов
60709 просмотров

How to get firefox language setting? (REALLY)

I know this question has been answered before, but the answer given is not the complete story: I went into Firefox's Options->Content and removed all languages except German/Germany, and navigator.language hasn't changed - it's still en-GB (I'm in the UK). I'm told if I get the German Firefo...

11
голосов
4ответов
30630 просмотров

How to convert Microsoft Locale ID (LCID) into language code or Locale object in Java

I need to translate a Microsoft locale ID, such as 1033 (for US English), into either an ISO 639 language code or directly into a Java Locale instance. (Edit: or even simply into the "Language - Country/Region" in Microsoft's table.) Is this possible, and what's the easiest way? Preferably using...