locale

With a browser, how do I know which decimal separator does the client use?

I'm developing a web application. I need to display some decimal data correctly so that it can be copied and pasted into a certain GUI application that is not under my control. The GUI application is locale sensitive and it accepts only the correct decimal separator which is set in the system. I can guess the decimal separator from Ac...

Using locale date format in Joomla modules

How to output a date in the locale date/time format in Joomla? I'm creating a module which is supposed to print dates. I know I can dirty-hack it like that: strftime(format_string, strotime($date)); ... but I would like a smoother solution, that would use Joomla's built-in locale handling functionality. ...

I18n - Data is in one locale, ui in another, which locale do I use for sorting?

Hi, I am working on the I18n of our java application and we have decided that we will only support data in one locale whereas the user interface may support many. My question is this: Should sorting and filtering of data be performed using the user's locale or the data's? Orginally we had assumed it made sense to sort according to d...

How do I permanently change java's default locale on Windows

I need to change the default locale that java uses on a Windows 2008 Server machine. Java is installed as part of an Oracle + Application server setup. I can do this in code, but I need to permanently change this setting. Edit: I should note that we're talking about jsp pages served via Application server so I can't exactly pass comman...

how to render a user the local-time using a UTC Time (asp.net & ajax)

Hi, I've an issue while my data persisted as utc date-time and I want my users see the right time (thier) local time. I can do this using javascript that sends the local time from the client machine to server, but this will cause me the first time the page will be seen it will be written using the UTC-Time. do you have more ways? than...

Setting default locale for Tomcat Service in Windows XP

I have installed Apache Tomcat 6 as a Service in a Windows XP computer (French) My problem is that Tomcat itself and all webapps (Sonar and Hudson) now show french messages. I want English messages of course so I went to the "Regional Settings" window in Control panel and changed everything to English (US) Tomcat however is still in Fr...

How to set LANG variable in Windows?

I'm making an application that supports multi language. And I am using gettext and locale to solve this issue. How to set LANG variable in Windows? In Linux and Unix-like systems it's just as simple as $ LANG=en_US python appname.py And it will automatically set the locale to that particular language. But in Windows, the C:\>SET LA...

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 only JDK standard libraries, of course, b...

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 Firefox INSTALL it will work, but I shouldn't need ...

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 this scenario? More info: Location is nec...

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? Thanks. `<table id="orders" class="sort...

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): File "<stdin>", line 1, in <module> ...

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(). Unfortunately, it seems that a fresh new Action...

Strategy for locale sensitive sort with pagination

Hi, 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 currently sort with ORDER BY in my S...

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

Is it allowed to have several title tags in html?

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

Is there a freely available list of country names and codes?

Is there a list of all the country names and their country code, such as US, AUS, UK, etc available which I can re-use in my code? Any plain text format e.g .txt, .csv, etc, or mysql database format will be fine. If there can be an additional list of various regions in the world, such as Western Australia, North America, etc, and the co...

C++ - 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 issue? Long/latitude string in stored in chara...

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

Hi, 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.println(str.equalsIgnoreCase(str.toUpperCase())); } ...

Java Date Format for Locale

How can I find the DateFormat for a given Locale? ...