EzDevInfo.com

locale interview questions

Top locale frequently asked interview questions

Why "LANG=C"? (not D or E or F)

In order to turn off localisation features one should set LANG environment variable to "C".

Why "C"? Where it came from?


Source: (StackOverflow)

How to change the UI language in Google Drive?

There is currently no option to change the UI language in Google Drive.

Is it possible to change it somehow?


Source: (StackOverflow)

Advertisements

Changing Windows locales on a per-process basis

Is there any way to change the Windows locale only for a particular program?

I have one or two programs that don't work correctly for non-English (U.S.) locales and would like to work around theirs bugs without changing my user-wide locale settings.


Source: (StackOverflow)

LANG and LANGUAGE environment variable in Debian based systems

It seems both the LANG and LANGUAGE environment variable are used by some programs to determine their user interface language.

What are the exact semantics of these variables and where can I read about their correct usage? The manpage for locale(1) only mentions the LC_* family of environment variables. Additionally there is also an LC_ALL variable commonly in place which isn't described there either.


Source: (StackOverflow)

Permanently change default language and keyboard settings - what am I missing?

I'm trying to configure a Debian Linux (ARMHF 3.8.13-bone20) on a BeagleBone Black to use German as the default language and keyboard layout, which does not work, and I can't see why. I'm talking about the console settings, not X or Gnome etc. Here are my settings and what I did so far:

dpkg-reconfigure locales

Here I chose de_DE.UTF-8 UTF-8 and unselected en_US.UTF-8 UTF-8.

Output from locale:

LANG=de_DE.UTF-8
LANGUAGE=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=

Content of /etc/default/locale:

LANG=de_DE.UTF-8
LANGUAGE=de_DE.UTF-8

Content of /etc/default/keyboard:

# KEYBOARD CONFIGURATION FILE
# Consult the keyboard(5) manual page.
XKBMODEL="pc105"
XKBLAYOUT="de"
XKBVARIANT="nodeadkeys"
XKBOPTIONS="terminate:ctrl_alt_bksp"
BACKSPACE="guess"

I ran setupcon after making these settings and it didn't change anything, the layout still was en_US.

After that, I ran

dpkg-reconfigure keyboard-configuration

and set German - no dead keys as keyboard layout. Still no change, neither at once nor after a reboot.

Next, I tried

dpkg-reconfigure console-data

Here I chose

Choose layout from entire list

and then

pc / quertz / German / Standard / latin1 - no dead keys

The output after that was:

Looking for keymap to install:
de-latin1-nodeadkeys
#

At this moment, the correct keyboard layout is present, but unfortunately things revert to the English (US) keyboard layout after reboot.

What can I do to permanently change the keyboard layout? As far as I can see the correct keymap must be present as it can get loaded, but only until the next reboot. WHat am I missing here? Thanks alot in advance for your help!

Update: When connecting via SSH the German keymap gets loaded.


Source: (StackOverflow)

Can I keep Windows from defaulting printers to A4 paper?

There's an old joke that English will be the language of Heaven, because Americans won't learn foreign languages. Microsoft seems to have internalized this joke...

I am an American English speaker; I occasionally need to type in Russian, so I install the Russian Phonetic Student (aka "yasherty") keyboard and occasionally switch to it. As soon as I install it, all of my printers default to A4 paper instead of Letter. Since the two sizes are pretty close, it's usually not a problem - but labels (actually, anything with narrow margins) don't work properly, and various documents insist on being loaded into the manual-feed tray of whatever printer I happen to be using. (It took me a while to understand why that was happening - that was how I initially discovered that my paper size had changed.)

I can go to Properties for each installed printer, and in Preferences - Paper/Quality - Advanced I can set the Paper Size for each tray the printer supports. That fixes the problem. However, if I install another printer - or if PDFCreator updates itself - I have to do it again.

This happens in Windows XP, Vista, 7, and 8 (I never installed an alternate keyboard before XP); it happens with the Russian Phonetic, Russian Standard, Russian Typewriter, and various French keyboard layouts. My Region and/or Locale settings (depending on the Windows version) have always been United States/English - but as soon as I indicate that I might speak another language, Windows apparently decides I'm European, and sets my paper size accordingly.


Source: (StackOverflow)

Where is the list of available Windows locales?

If you open the Regional and Language Options (via Control Panel), and click on the Regional Options tab, then there is a drop down list of all the available locales.

Where is this list populated from?

(I want to compare the settings for each locale; I'm fine with how to do that, but I need a list of locale names to loop over.)


EDIT: After browsing through my windows directory (should probably mention I'm using XP), the file

C:\WINDOWS\system32\locale.nls

looks like a plausible candidate, but it's a binary file. Is this what I should be looking at, and if so, how do I read it?


Source: (StackOverflow)

changing the current set locale on a Linux(Ubuntu)

I have a Ubuntu system on which current locale is(output of locale command):

LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=

I want to change it to en_GB, because some characters are not handled properly on the terminal display.

What is the command to change the locale?

What is the command to see what different locales are available on current system for me to set/try?


Source: (StackOverflow)

Can I Start particular program with different language settings in Windows

I am using my windows with Turkish language as first choice. Non-Unicode programs also use Turkish language.

My particular program, Visual Studio 2005 (Business Intelligence Studio 2005) is behaving strangely with this language setting. It has no problems with English Language settings.

I would like to start only this program with English Language Settings.

I can use new bat/cmd file. Modify shortcut etc. Every solution is welcome. Only I do not want to change entire windows settings.

I am using Windows 7.


Source: (StackOverflow)

Windows login screen in a different keyboard 'language' than windows

Recently I had to change my domain password. I did, and used the new password all day, logging in to various services using it.

I then rebooted the machine, and when I can to login to the machine using the new password I couldn't. After a lot of playing around I discovered that it was because my new password had the " character (Shift-2 on my keyboard) but when I pressed Shift-2 at the login screen I was getting the @ character and had to use Shift-' to get the ". This behaviour happens when I get to the login screen after a reboot, but not when the machine locks after I have logged in. Once I'm logged the first time in I can login subsequently using Shift-2.

So how can in ensure that the windows 7 login screen is using the same keyboard scheme as when I log in? (I think login screen is en-us and main windows is en-uk)


Source: (StackOverflow)

Linux - Forcing 24-hour locale?

Is there any way to force 24-hour time in my locale (for example, 14:00) instead of 12-hour time (2:00 PM)?

I use the en_US locale with a UTF-8 character set on Arch Linux, but this shouldn't matter, I think.


Source: (StackOverflow)

How can I get the encoding of my system?

Is there any command for command prompt through which I can know the default encoding of my system?


Source: (StackOverflow)

Mac: can I create custom region settings, copy, distribute and reuse it?

I'm a very finicky person when it comes to my locale settings, and none of the preset regions is good enough for me.

I want my dates in german (or ISO) format, but I want the names of days and months to remain in english.

I want 24h format, SI units, USD currency with clear notation for negatives, and so on and so on. The specifics don't matter much. The settings that I care about are all under the Format tab of the International prefpane.

Every new Mac that I setup from scratch, I have to customize each tiny item bit by bit.

What I want to know is if all these things are in a sensible plist file that I can put on my Dropbox and load into every Mac that I have an account on. Or, better yet, if I can actually create a new Region that would appear under the region dropdown in the aforementioned prefpane tab.


Source: (StackOverflow)

French accents on a PC with US keyboard ?

My laptop has a US keyboard, and I need to write some French, with accents.

I know there's a painful way to do it with combinations of the alt key and the ascii code alt-codes, but I was wondering if there was an easier way to do it.

PS: Since the question is closed (but the answers no great) I thought I'd add this addendum. Basically, you need to set the keyboard to US International and then you can do accents using 'e or 'a; see this link: http://support.microsoft.com/kb/97738 screenshot

PS: Much much better solution: http://keyxpat.com.


Source: (StackOverflow)

Meaning of LC_IDENTIFICATION environment variable

Just out of curiosity, what is the meaning of LC_IDENTIFICATION?

The reason I am asking is, that a fresh US-English installation of Linux Mint (I guess Ubuntu would be the same), located in “Jerusalem” for time zone, left me with the following mix and match locale in /etc/default/locale:

LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=he_IL.UTF-8
LC_TIME=he_IL.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=he_IL.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=he_IL.UTF-8
LC_NAME=he_IL.UTF-8
LC_ADDRESS=he_IL.UTF-8
LC_TELEPHONE=he_IL.UTF-8
LC_MEASUREMENT=he_IL.UTF-8
LC_IDENTIFICATION=he_IL.UTF-8
LC_ALL=

As I was working to fix it to my liking, I was wondering if I should also update LC_IDENTIFICATION.

The man page for locale(1) says “Metadata about the locale information”, but it does not tell me exactly what the effect of changing it would be. Can you think of any application or API using this variable and how?


Source: (StackOverflow)