Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 23 Jun 2018, 05:00
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects » Localization Project
Pcreole Language Support
Moderators: Lobster, MU, raffy
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [1 Post]  
Author Message

Joined: 16 Aug 2007
Posts: 3198

PostPosted: Sat 21 May 2011, 20:41    Post subject:  Pcreole Language Support  

Pcreole Language Support

English - Native
German - L18L (real name currently unknown...:-)

You can download Pcreole and its current translation dotpets here

Many thanks to the translator(s). Especial thanks to L18L who helped me invaluably with my wishes to internationalise Pcreole, and to shinobar, who unwittingly helped me in that regard with his ffconvert implementation, which also uses gettext.

New translations invited! Some help on how to do this is provided below. I would be grateful if you could post your translations at the end of this thread (either as dotpets which place the .po and .mo files into the directories indicated below, of simply as the files themselves from which I or someone else, will create a dotpet to ease installation with the Petget package manager). I will later store the download copy of your translation dotpets at the main Pcreole thread/post here.


Pcreole is internationalised using gettext to display all programme text and labels. The Pcreole bash script exports the following three variables into its environment to allow this all to work (note that translators don't need to do this bit since it is part of the Pcreole programme itself):


export TEXTDOMAIN=pcreole
export TEXTDOMAINDIR=/usr/share/locale

The gettext strings embedded in the Pcreole programme script have all been collected and stored in a separate text file called pcreole.pot, which pcreole-x.x.x.pet installs into the directory /usr/share/doc/pcreole/nls/. If you have the DEVX sfs added to your Puppy system, you can alternatively make a new pot file of your own for pcreole by running the command:

xgettext --lang=shell -o pcreole.pot /usr/bin/pcreole

You can then store the resultant pcreole.pot file in directory /usr/share/doc/pcreole/nls/

Next step is to create the .po text translation file from the .pot file. You can do that by running the following command line:

msginit --locale=your_locale --output-file=your_locale.po --input=pcreole.pot

where "your_locale" might be, for example, de, ru_RU, zh_CN, fr, it or whatever...

Now edit your_locale.po file using your favourite text editor to add the new "msgstr" translations (or better still, use an editor like Poedit, which is specially designed for this task). For an example, if you have L18L's pcreole German translation installed, you can refer to the file /usr/share/doc/pcreole/nls/de.po

You should also store your "your_locale.po" translation in the directory /usr/share/doc/pcreole/nls/

Next you need to create the binary pcreole.mo file from the your_locale.po file. You can do that with the following commandline:

msgfmt --check --output-file=pcreole.mo your_locale.po

Finally, store the resultant pcreole.mo file in the directory /usr/share/locale/your_locale/LC_MESSAGES/ and if you set your system locale to "your_locale" Pcreole should now provide all its text in your language.

One way of checking that everything is working, without having to change locale first, is to start pcreole from the commandline with the following command:

LANGUAGE=your_locale pcreole

For example:
LANGUAGE=de pcreole

Here is a screenshot (courtesy of L18L) which shows Pcreole-3.0.0 running, in small gui mode, with LANGUAGE=de (German):

Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [1 Post]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects » Localization Project
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0305s ][ Queries: 12 (0.0049s) ][ GZIP on ]