Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-27-2008, 09:26 AM   #1
LQ Newbie
Registered: Dec 2008
Posts: 2

Rep: Reputation: 0
Localization in linux


I want to know how localization is done in linux ie if one changes the locale to some other one say german and tries to view labels or captions will it be observed in german also does the localization apply to user defined texts

Old 12-27-2008, 02:15 PM   #2
Registered: Sep 2007
Location: Berlin
Distribution: Slackware
Posts: 509

Rep: Reputation: 41

If you write your own stuff, you'll have to put it into the localization loading mechanism recognized by the programming language/library you use or check the appropriate environment variables for yourself. If you just like to add some messages to an existing application, there's usally a file to put your new stuff into, because the loading mechanism is already done by someone.

The Linux libc has some -predefined mechanisms to act upon the LANG & LC_MESSAGES settings (LC_CYTPE, LC_ALL, LC_MONEY, LC_YOUNAMEIT...), but in other programming languages you might to it by yourself.

Here's a detailed example how to do it in Gtk:

But it really depends on wether your application is pure C with localization via Linux' libc or a Gtk app or some KDE stuff or written in Java...

And not every application running under Linux is necessarily localized.
Old 12-28-2008, 01:45 AM   #3
LQ Newbie
Registered: Dec 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Hi Thanks

Actually My app is a java app where i need to translate strings at runtime depending upon the locale given . I wanted to know if there is some OS level API's which can translate the messages with built in localization support . Or do i need to use some other 3rd party API'c to do this .

My basic doubt is can i use the Built in linux Localization support to get my work done

I cannot use the resource bundle mechanism of java as the strings are supplied at runtime by the user


Last edited by pramod101; 12-28-2008 at 01:47 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Software Localization Tool for Linux ocampod Linux - Software 1 03-18-2008 02:28 PM
Tcsh and localization Karu Slackware 4 09-18-2007 01:13 AM
Linux Localization for Beignner Mustafa^Qasim Linux - Software 1 07-16-2007 01:58 AM
localization sandeepps4 Linux - General 1 06-05-2007 02:39 AM
Localization of Slackware 9.0 karagh Slackware 10 12-26-2003 10:55 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:16 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration