locale

SQL Server: Must numbers all be specified with latin numeral digits?

Does SQL server expect numbers to be specified with digits from the latin alphabet, e.g.: 0123456789 Is it valid to give SQL Server digits in other alphabets? Rosetta Stone: Latin: 01234567890 Arabic: ٠١٢٣٤٥٦٧٨٩ Bengali: ০১২৩৪৫৬৭৮৯ i know that the client (ADO) will convert 8-bit strings to 16-bit unicode strings using the curre...

How to display locale sensitive time format without seconds in python

I can output a locale sensitive time format using strftime('%X'), but this always includes seconds. How might I display this time format without seconds? >>> import locale >>> import datetime >>> locale.setlocale(locale.LC_ALL, 'en_IE.utf-8') 'en_IE.utf-8' >>> print datetime.datetime.now().strftime('%X') 12:22:43 >>> locale.setlocale(l...

How to get Locale from its String representation in Java?

Is there a neat way of getting a Locale instance from its "programmatic name" as returned by Locale's toString() method? An obvious and ugly solution would be parsing the String and then constructing a new Locale instance according to that, but maybe there's a better way / ready solution for that? The need is that I want to store some l...

linux locale unset

I have a ARM based machine with ubuntu distro on it and it often feeds me with this while running various commands: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "pl_PL.UTF-8" This is output of the locale command locale: Cannot set LC_CTYPE to default locale: No such file or directo...

Adding configChanges ="locale" programatically

I use configChanges="locale" on my activities. Without this options in AndroidManifest.xml in 2.x i get flickering screens. It works in all my activities excepting in the preferences screen i add programatically. I have one Preference Activity --> it works after setting configChanges="locale" to the AndroidManifest.xml. Inside of the P...

Django custom locale directory

I'm developing a project with two different sites, divided by language. Maybe I was terribly wrong, but now my directory structure looks like: /ruapp/settings.py # SITE_ID = 1 /ruapp/manage.py /enapp/settings.py # SITE_ID = 2 /enapp/manage.py /common/urls.py /common/ # almost every other file /common/templates/ # templates with ...

How to determine user's language setting from LocalSystem

I have a Windows system service that needs to communicate string information to an application running under the user's account. The strings will appear to the user so I want to make sure that the strings that the service passes to the application are in the same language as the user account. How can I tell what display language the curr...

How can I make a case-insensitive regexp match for Russian letters?

I have list of catalog paths and need to filter out some of them. My match pattern is in a non-Unicode encoding. I tried the following: require 5.004; use POSIX qw(locale_h); my $old_locale = setlocale(LC_ALL); setlocale(LC_ALL, "ru_RU.cp1251"); @{$data -> {doc_folder_rights}} = grep { # catalog path pattern in $...

.Net CultureInfo.InvariantCulture in Java

In .Net when handling numbers with unspecified locale I use: return double.Parse(myStr, CultureInfo.InvariantCulture.NumberFormat); Whats the equivalent in Java? java.util.Locale doesnt seem to include such a thing. ...

Convert keyboard layout from AZERTY to QWERTY

I'm programming in Java using a French machine with an AZERTY keybord. I like to type text with a certain character, the colon, test: hello. When I launch the test, only test is displayed. Are there ways in Java to convert the colon : to the QWERTY equivalent? ...

How to extend/patch an existing module or package?

I want to extend some locale-specific features of a python application named OpenERP. All I need is implementing a third party module.function that would be called every time OpenERP calls locale.setlocale() function without changing neither OpenERP nor locale module source code. The only way I can imagine is provide a module named loca...

View default locale for IIS 6.0 on Windows 2003 machine

Is there any method I could use in my web application to view the locale value used by IIS 6.0 on Windows 2003 Server? I call GetLocale which returns me the LOCALE_SYSTEM_DEFAULT, but I would like to confirm that even IIS is using the same locale. The reason I want to view IIS locale value is, two web servers having the same LOCALE_SYST...

QLocale, what is the scope of the global QLocale::setDefault()?

Problem: I have a QT based multiplatform (win,mac,*nix) application that parses ascii files containing decimal numbers. parsing is done using a variety of different code pieces that use anything from qt string stuff, c++ stdin, oldstyle scanf, etc. ascii files have always the '.' (dot) as separated decimal (e.g. in the file to be par...

[Android] Change language settings (locale) for the device

Hi, I know it's possible to have multiple languages in a single application through the res/string and depending on Locale. Here is a case http://stackoverflow.com/questions/2078289/android-controling-the-user-language Now how can I change the language in the phone ? Like I'd do by Menu > Settings > Language & Keyboard > Select locale ...

C# define string format of double/floats to be US english by default

I have got several thousands of lines of a web application source code, initially written on a US development system, to maintain. It makes heavy use of SQL statement strings, which are combined on the fly, e.g. string SQL = "select * from table where double_value = " + Math.Round(double_value, 2); Don't comment on bad programming sty...

Why Java double print format differs depending on using String.format or not

This code: System.out.println(String.format("%f", Math.PI)); System.out.println(Math.PI); produces that result on my computer: 3,141593 3.141592653589793 Why does the first line print float number with comma while the second one uses dot? ...

UIDatePicker locale does nothing?

I'm creating a UIDatePicker programmatically, and setting its locale with the following code: datePicker.locale = [[[NSLocale alloc] initWithLocaleIdentifier:@"es_ES"] autorelease]; The datepicker still appears in English (or whatever language I've set the phone to). Anyone have any idea why this does nothing, or how to fix it? ...

Native Win32 NLS - strange default sub language for Portuguese

Doing LANGID and LCID gymnastics right now. Just noticed that in native Win32 NLS, SUBLANG_PORTUGUESE_BRAZILIAN is the user default sub language for the LANG_PORTUGUESE primary language. I expected SUBLANG_PORTUGUESE to be the default sub language. Why isn't it? ...

How to get date in specific locale with JavaScript?

I need to get the date in a specific locale using JavaScript - not necessarily the user's locale. How can I do this? I did some research and found date.getUTCMonth() and date.getUTCDate(). How can I use this or something else to get the date in a certain locale? ...

Calling Grep inside Java gives incorrect results while calling grep in shell gives correct results.

I've got a problem where calling grep from inside java gives incorrect results, as compared to the results from calling grep on the same file in the shell. My grep command (called both in Java and in bash. I escaped the slash in Java accordingly): /bin/grep -vP --regexp='^[0-9]+\t.*' /usr/local/apache-tomcat-6.0.18/work/Catalina/localh...