Puppy in other languages: locale support

Using applications, configuring, problems
Post Reply
Message
Author
Kark
Posts: 26
Joined: Tue 26 Jul 2005, 07:33
Location: Norway/France

Puppy in other languages: locale support

#1 Post by Kark »

I have added norwegian locale support to my puppywith localedef

This has solved the problem of not getting norwegian characters in java virtual machine, but now I can't write Norwegian characters in Sylpheed. That is: I can use them in the headings and adress fields, but not in the message field!

When I start Sylpheed from terminal I get this message:

GTK warning **: Locale not supported by C library

The same with a lot of other programs.

How can one get complete suport for locale? Are there programs that need to be compiled with special options for i18n?

Kark

Kark
Posts: 26
Joined: Tue 26 Jul 2005, 07:33
Location: Norway/France

False alarm

#2 Post by Kark »

I must have messed up something.

After redoing everything both java virtual machine and sylpheed use the right characters


Kark :D

Leon
Posts: 265
Joined: Wed 22 Jun 2005, 21:33

#3 Post by Leon »

I succeeded to set up JWM, Leafpad, OpenOffice and Mozilla Mail and News to work properly for use in Slovenian language without changing puppywith localedef.

Some main character encodings that support Slovenian characters are: Microsoft Code Page 1250 (Microsoft Windows Latin 2), iso8859-2, UTF-8, ...

1. I've set up Slovene qwertz keyboard layout through Mouse/keyboard Wizard.
2. I've installed True Type fonts that properly display Slovenian characters.
3. I've set one of this fonts as default in each program.

After I've read your post I've tried to do that through Sylpheed's Configuration menu and it works too.

I've set up:
Configuration /Common Preferences /Display /Font/
(iso8859-2 section)
avantgarde /book

I've noticed too that Beaver text editor don't respond to the keys when typing letters that carrie a diacritic: a caron (hacheck, check).

Would you be willing to decribe how you made it?

Thanks in advance,
Leon

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#4 Post by BarryK »

Yes, guys, if could kindly document everything as detailed as possible, as I
do need to think about international support for future Puppies.

Being English-speaking myself, and thinking that as Puppy is a tiny distro,
will not bother with the rest of the non-English world... but perhaps it really
doesn't add that much size to Puppy to put in international support.

So, I would like to start considering it, but don't know anything about it at this
stage, so whatever you can write down will be helpful.

Note, I have just made a note on the News page, keyboard layout has a bug in 1.0.4,
will be fixed for 1.0.5alpha2.

User avatar
puppian
Posts: 537
Joined: Tue 19 Jul 2005, 03:58
Location: PuppyLand
Contact:

#5 Post by puppian »

It would be great if puppy can speak different languaes! :D I've made a brief summary below on what has been achieved so far.

===============================================================
Kark: A few applications can easily be made to appear in the language of your choice,

Opera:
1. Download a language-file to opera's locale dir(/usr/share/opera/locale).
2. Go to tools-preferenses and choose your language.
Abiword:
1. Download a Abiword.profile file made for your language, or copy it from some other installation.
Put it in /root/.Abisuite/
2. Download also a strings file in your language, and copy it to your strings directory.
3. Download a dictionary file and put it in dictionary dir. more info
Firefox:
1. Download firefox in your language.
2. Unzip it and run installer: it's working

--------------------------------------------------------------------
G2: To show documents in international fonts
(Mozilla/Firefox/Opera (and Abiword, Leafpad, Open Office, etc etc etc), put a unicode font in /root/.fonts (get the unicode font at http://www.ipd.uka.de/~muelle/ARIALUNI.zip
or http://orwell.ru/download/aruniupd.exe)

Or, you can copy or symlink /mnt/home/windows/fonts to /root/.fonts,
you will have all of your Windows fonts available.

--------------------------------------------------------------------
To view web page in other languages with Dillo 0.8.5 Patched:
puppian:
Besides adding the unicode font to /root/.fonts, you also need to:
1. Set it to use the font (Arial Unicode MS) in Dillo's option
2. Get the glibc package here and install it (just copy files to the right location):
(this is version 2.3.2 as I now know that puppy uses 2.3.2)
...I don't know why adding that package works and don't know which files are actually responsilbe
for that. Maybe someone more knowledgeble than me can add the explanation?
G2's comment:
i just noticed that UTF-8 fonts do work with dillo in Puppy ... it is other fonts like Shift_JIS that do not work
i also noticed, that Google sends Firefox a page with UTF-8 characters, but it sends Dillo a page with Shift_JIS characters (which don't work with Dillo)
Wikipedia seems to work wih Dillo, for example
http://www.wikipedia.org/
http://www.google.com/intl/ja/
http://tinypic.com/ajlb9z.jpg

===============================================================
To add support for new locales:

A. Hacao's solution (tested in Vector 5):
I success in Vector 5 show & typing Vietnamese

1) locale to en_US.UTF-8

$ locale (show LANG=en_US)
$ su
# mcedit /etc/profile.d/lang.sh (or editor other)

- Add # (comment) before "export LANG=en_US"
- Remove # (uncomment) before "export LANG=en_US.UTF-8"
- F2 to saved , F10 to quit

# locale or $ locale (show LANG=en_US.UTF-Cool

2) make link en_US.UTF-8 to /usr/share/locale

$ su
# mkdir /usr/share/locale/en_US.UTF-8
# localedef -v -c -i en_US -f UTF-8 /usr/share/locale/en_US.UTF-8
# cd /usr/lib/locale
# ln -s /usr/share/locale/en_US.UTF-8 en_US.UTF-8

3. setup .bashrc or .bash_profile

$ mcedit /home/hacao/.bash_profile (hacao is my account)
Add three row:
export XMODIFIERS="@im=unikey"
export GTK_IM_MODULE="xim"
export LANG=en_US.UTF-8

- Press F2 to saved, F10 to quit.
- Logout or reboot PC
- Check it again:

$ echo $LANG (show en_US.UTF-8 is OK!)
$ echo $XMODIFIERS (show @im=unikey is OK !)
$ echo $GTK_IM_MODULE (show xim is OK!)

4. Setup Unikey (typing Vietnamese)
- Download from http://unikey.sourceforge.net/linux.php
- Unpack to /home/hacao/addon
i have folder: /home/hacao/addon/x-unikey-0.9.2

$ cd /home/hacao/addon/x-unikey-0.9.2
$ ./configure
$ make
$ su
# make install

That all ! I type "unikey" in Xterm to run Vietnamese typing !

$unikey

and open a editor to enjoy ! Smile

$mcedit (or editor other)

success !
P/S: I'm not yet success with PUPPY 1.04!

--------------------------------------------------------------------
B. Kark's Solution (base on what Hacao did, tested in Puppy)

I found gcc here, and in one of the zipfiles localedef is included:

First I copied locale no_NO from a different distro
then I opened a teminal and did:

mkdir /usr/share/locale/no_NO.ISO-8859-1
localedef -v -c -i no_NO -f ISO-8859-1 /usr/share/locale/no_NO.ISO-8859-1
cd /usr/lib/locale
ln -s /usr/share/locale/no_NO.ISO-8859-1 no_NO.ISO-8859-1

Then I changed LANG=C to LANG=no_NO.ISO-8859-1 in /etc/profile

Now I don't get any error messages about locale not being supported anymore, and jvm (java virtual machine) works like it should.

===============================================================
Keymap:

How do I add Latvian keyboard layout?
Puppy 1.0.4: German keymap is de.map; should be de-latin.map
Last edited by puppian on Sun 21 Aug 2005, 12:04, edited 1 time in total.
[url=http://puppylinux.org]Puppylinux.org - Community home page of Puppy Linux[/url] hosted by Barry (creator of Puppy), created and maintained by the [url=http://puppylinux.org/user/readarticle.php?article_id=8]Puppy Linux Foundation[/url] since 2005

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#6 Post by Lobster »

I have "translated" into Japanese a wiki page
http://www.goosee.com/puppy/wikka/JapaneseLanguage

but it is displaying as Unicode (I believe) Can anyone see the Japanese? (I thought because I had the new Rox it might work - but I need something for Netscape?) Advisement welcome before other languages notably Arabic and Hebrew are added . . .

well here is the basic info on unicode . . .
http://www.joelonsoftware.com/articles/Unicode.html
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

Kark
Posts: 26
Joined: Tue 26 Jul 2005, 07:33
Location: Norway/France

#7 Post by Kark »

Thank you puppian, for gathering the internationalisation in one place.

Unfortunately there is a small error in the procedure for adding locale support. I copied blindly from Hacao, but he was doing it in Vector, so the last to lines, #cd /usr/lib/locale, and then the symbolic link, doesn't make sense in Puppy (I think) as there is no /usr/lib/locale.

Just making the directory and using localedef to add a new locale is sufficient for the locale to show up when you run locale -a, and after setting the locale to nb_NO (for example) programs that are able to will show up in Norwegian bokmaal. There are, however, lots of programs that wont behave any differently, possibly due to lack of i18n support added in the compiling(?).

What the symlink is for, I'm not shure. would be nice if anyone(Hacao?) could explain this.

Now that locale support is(or can be) added, there is an easier way for getting Abiword in the right language. As long as you have the strings files in place for your language you can ask Abiword to use the locale information to decide which language it should use. You edit AbiWord.Profile and set useenvlocale to 1, like this: useenvlocale="1"

I copied the strings file from a windows installation.

I have also made Wavesurfer appear in Norwegian, so if anyone is interested in translating to their mother tongue I'll gladly give instructions.

Kark
:)

User avatar
puppian
Posts: 537
Joined: Tue 19 Jul 2005, 03:58
Location: PuppyLand
Contact:

#8 Post by puppian »

I've added the information and your new comments to this page:

http://www.goosee.com/puppy/wikka/LanguageSupport

Please feel free to edit it and add any your new findings.
:D

Wiki Howto:
http://www.murga.org/~puppy/viewtopic.p ... light=wiki
[url=http://puppylinux.org]Puppylinux.org - Community home page of Puppy Linux[/url] hosted by Barry (creator of Puppy), created and maintained by the [url=http://puppylinux.org/user/readarticle.php?article_id=8]Puppy Linux Foundation[/url] since 2005

Post Reply