Author Topic: Localization Manager (addlocale)  (Read 147954 times)

Offline pinoc

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2841
    • other projects...
Localization Manager (addlocale)
« on: March 16, 2009, 11:51:50 AM »
Use addlocale to add a non-English locale to your PCLinuxOS system.  

Important note for users wanting to stay with 2009.2 release and KDE3, please read  here


Quick Instructions:  
-> read the Important notes in this post, they are constantly updated and contain additional useful information.
-> please always install the latest version (4.1, see end of this thread)
-> run: PCmenu -> More Applications -> Configuration -> Localization Manager
-> read the messages in the popup-windows, they are provided for a reason...
-> the default is set to use UTF-8 encoding. Only if you have problems with the display of diacritics and ligatures (these are letters like é, è, ë, ê, ü, ç, œ, ø, ñ in French/German/Portuguese/Italian/Spanish/Turkish/Swedish, etc.) you can try the following:
PCmenu -> More Applications -> Configuration -> Configure Your Computer; System -> Manage localization for your system; choose your language and click on Advanced; in the new window select Old compatibilty (non UTF-8) encoding; logout/login to apply the changes.
More info on utf-8 encoding can be found at utf-8 setup, utf-8 FAQ, language environment variables


Purpose/Features:
Transform an English PCLinuxOS Desktop and its applications in widely spoken languages like Arabic, French, Russian, Chinese, Spanish, Hindi, and even exotic ones like Zulu or Welsh.  A new locale is only added to the existing English locale and the original English locale remains untouched.  The script also has the (default) option to revert to the original en_US setup, in case you were curious to see what a Hebrew or Punjabi PCLinuxOS desktop looks like and then got completely lost...  ;D

Requirements:
- PCLinuxOS LiveCD (2011.09 or later) or an installed PCLinuxOS system (fully updated!)
- working Internet connection
- addlocale needs to download files which are not in the repository and for this reason it does not work with a local repo copy.

Supported languages:
========================================
At present, addlocale provides support for a total of 84 localizations, including the option to revert back to the default English (US). The following languages are available for a given window manager:

KDE4: 64 languages
Arabic, Basque, Belarusian, Bengali, Bulgarian, Catalan, Chhattisgarhi, Chinese (simplified), Chinese (traditional), Croatian, Czech, Danish, Dutch, English (GB), English (US), Esperanto, Estonian, Farsi, Finnish, French, Frisian, Gaelic, Galician, German, Greek, Gujarati, Hebrew, Hindi, Hungarian, Icelandic, Indonesian, Italian, Japanese, Kannada, Kashubian, Kazakh, Khmer, Korean, Kurdish, Latvian, Lithuanian, Macedonian, Malayalam, Marathi, Nepali, Norwegian (Bokmaal), Norwegian (Nynorsk), Polish, Portuguese (Brazil), Portuguese (Portugal), Punjabi, Romanian, Russian, Low Saxon, Serbian, Slovak, Slovenian, Spanish, Swedish, Tajik, Thai, Turkish, Ukrainian, Walloon.

non-KDE4: 73 languages
Afrikaans, Arabic, Azeri, Basque, Belarusian, Bengali, Bosnian, Breton, Bulgarian, Catalan, Chinese (simplified), Chinese (traditional), Croatian, Czech, Danish, Dutch, English (GB), English (US), Esperanto, Estonian, Faroese, Farsi, Finnish, French, Gaelic, Galician, German, Greek, Hebrew, Hindi, Hungarian, Icelandic, Indonesian, Italian, Japanese, Korean, Lao, Latvian, Lithuanian, Macedonian, Malay, Maltese, Mongolian, Norwegian (Bokmaal), Norwegian (Nynorsk), Polish, Portuguese (Brazil), Portuguese (Portugal), Punjabi, Romanian, Russian, Saami, (Low) Saxon, Serbian, Slovak, Slovenian, (Upper) Sorbian, Sotho, Spanish, Swati, Swedish, Tajik, Tamil, Thai, Turkish, Ukrainian, Uzbek, Venda, Vietnamese, Welsh, Walloon, Xhosa, Zulu.

Instructions for a PCLinuxOS liveCD and a PC with at least 1.5 GB RAM :
==================================================
1. Start the PCLinuxOS liveCD (2011.09 or any newer PCLinuxOS edition) and login to the guest or root account.
2. Start addlocale from the menu: PCmenu -> More Applications -> Configuration -> Add Locale
3. Read the provided messages, choose the desired new localization, and watch addlocale doing the job. Finally, addlocale will logout. Please do not reboot or you will have to start all over again.
4. Login again to the guest or root account and continue using your localized live-session or install the already localized and configured system to your hard disk by clicking the desktop icon 'Install PCLinuxOS'.

Instructions for an installed PCLinuxOS system:
========================================
1. Update your system: start Synaptic, click the button Reload, when finished click the button Mark All Upgrades, and finally the button Apply.
2. Start addlocale from the menu: Start -> More Applications -> Configuration -> Add Locale
3. Read the provided messages, choose the desired new localization, and watch addlocale doing the job.  Please use LibreOffice Manager for any LibreOffice-related task such as install, reinstall, fix, completely remove, or add another LibreOffice language. Finally, addlocale will reboot and apply the changes to the system.
4. Login to and enjoy your new localized PCLOS system.

Important notes:
========================================

1.) Users running the e17 (Enlightenment) window manager:
after running addlocale the e17 user will have to manually set the locale to use either by
a) StartMenu -> Settings -> Settings Panel: top panel go to the right and select 'Language', then 'Language Settings', choose the language to use, press 'Apply', then 'Close' and again 'Close'; then logout/login  
b) in e17, open a terminal and enter:  
Code: [Select]
enlightenment_remote -lang-set de here 'de' is for German, other applicable language codes in e17 can be found using:
Code: [Select]
enlightenment_remote -lang-list and of course the new language must already be installed with addlocale; then logout/login

2.) Any application which is installed after changing to a new locale will automatically appear in the new locale (if a translation for this application is available in the chosen locale, else it will be in English). Please note that the amount of applicable translations will be different for different languages.

3.) The idea was to offer a 'comfortable' switch to the new locale, meaning to setup a readily usable desktop including all necessary fonts for a proper display of the new locale. If available, existing applications will get the new locale and additional new applications are only added if they are required or considered meaningful for the new locale. Adding a new locale will NEVER remove anything but only add what is required for the new locale.

4.) To add more than one new locale to the system run addlocale again for each new locale.

5.) addlocale problems:
a) Please realize: if your system has unmet dependencies or broken packages then addlocale can not work. How to test for broken packages/unmet dependencies: open Synaptic, press Reload, Mark All Upgrades, Apply. After a successful update click on Custom at the left bottom of Synaptic and then look in the left panel under Broken and ensure there is nothing listed. If you have broken packages: select Edit in the Synaptic menu and then Fix Broken Packages. In case of duplicate packages run Start -> Packaging -> Dupeclean-gui. Now that your system is in good state, run addlocale.
b) if you still have problems: open a konsole window, enter:
Code: [Select]
addlocale and post the konsole output here in this thread together with additional information like your window manager (KDE4, LXDE, etc), the PCLinuxOS version you use, if your system is fully updated, do you get the same error when running addlocale as root, etc. Remember: detailed and concise information is a prerequisite to fix your problem and will help improving addlocale.
c) If you use a proxy server: open a konsole and enter:
Code: [Select]
export http_proxy="http://proxy.example.com:8080"then in the same konsole enter:
Code: [Select]
addlocale

6.) Please be aware that there are two language settings:
PCLinuxOS-KDE4:
===========
- the system language: you can only have one (1) system language and all applications will be displayed in the system language.
- the desktop language: you can have several desktop languages, or a different desktop language for each user on the system. The desktop language applies to the KDE4 desktop of a given user only.
After running addlocale, the KDE4 control center will only show the latest new locale and English but all other previously added locales are still available:
a) in any user account, go to KDE4 control center (Start -> More Applications -> Configuration -> Configure Your Desktop), Common Appearance and Behavior -> Locale -> Regional & Language -> Country/Region & Language and then on the right panel click on the tab Languages. The left panel lists "available languages."  The right panel lists "preferred languages."  The buttons between the panels enable you to move a selected language from one panel to the other.  On the right of the right panel are buttons which enable you to move languages listed in that panel up and down. Move the language of your choice to the first position then click on Apply, close the Control Center, then logout/login: this will only change the KDE4 desktop language for the current user but the application language will be unchanged because it follows the system language.
b) open the language section in PCC (Start -> More Applications -> Configuration -> Configure Your Computer), then click on System -> Manage localization for your system, select the new locale, then logout/login: the KDE4 desktop language will be unchanged (cause it was not changed) but the application/system language will now be in the new locale.
c) to change the entire System to a different locale either follow the steps in a) and b) or, easier, just run addlocale again.

PCLinuxOS non-KDE4
=============
a similar logic as for KDE4 applies. In addition, you can choose a user-specific language setting from the 'Language' tab on the GNOME login screen, in case of using the Gnome display manager.

7.) For spellchecking in Firefox/Thunderbird/LibreOffice in a different locale you need to install the corresponding spellchecker separately as an addon. Check here for Firefox, for Thunderbird, and for LibreOffice: ensure LibreOffice is closed, then go here, download the appropriate dictionary, open it with LibreOffice, and follow the instructions.

8.) Input of non-standard characters: (re-post from longtom and DeBaas)
First choose the USA intenational keyboard (PCC -> Hardware > Set up the keyboard layout > choose US keyboard international.), then you have the dead keys.
Umlaut ü, ö and ä: type " (you don't see it) followed by u and you get ü
[alternative: right alt, keep it pressed and press ";" then release the 2 keys and press either "a", "u" or "o" (or Shift + "a" etc for capital letters)]
ñ: ~ and n gets you your Niña
ß: hold the right WIN key (next to the right Alt) and typ two times s and will get ß
ç: hold the right WIN key and type , followed by c and there it is ç
: right Alt-5 or right Alt-e is €


9.) If you use a proxy server:
open a konsole and enter:
Code: [Select]
export http_proxy="http://proxy.example.com:8080"or with authentication:
Code: [Select]
export http_proxy="http://password:username@proxy.example.com:8080"then in the same konsole enter:
Code: [Select]
addlocale
10.) Additional Information:
- to learn about using additional options (addlocale version and system update test) enter in a terminal: addlocale --help to find out about the command-line options --no-vtest (skip the test for the latest version of addlocale) and --no-updatetest (skip the test to check if your system is fully updated)

good luck and have fun!
-pinoc

PS: some desktop screenshots can be found in the animation on this page, and there is also an article on addlocale and the old getopenoffice (now lomanager) in the PCLinuxOS magazine.

Example results:


Thanks to DutchWolfie for the detailed instructions on adding the Dutch locale as well as OpenOffice:
PCLinuxOS 2009.2 the sequel

« Last Edit: May 30, 2012, 03:39:21 AM by pinoc »

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: 2009.1 International, or how to change to a non-English locale
« Reply #1 on: March 16, 2009, 01:02:36 PM »
Can't stat /home/<user>/.gvfs

The directory appears to have the users permissions but they cannot be changed.
The directory cannot be deleted.
Even root cannot delete this directory!  ???

Permissions
dr-x------

Owner can view only, everyone else is blocked.

I try to get to the directory using super user mode file manager from the user account and the directory does not show!

Should the script be run from the root account, rather than just as root from a user account?

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: 2009.1 International, or how to change to a non-English locale
« Reply #2 on: March 16, 2009, 01:12:39 PM »
Running the script from the root account did not show any error as previously.

OOo writer does not seem to be compliant.

ON any of the permissions I have checked all the permission options are not available in new language.

I have yet to check a couple of other languages to see if it is language related or not.

It sure is surprising how much IS changed.

Congrats on a great script.

EDIT & Update
                        The 'missing' language pieces seem to be because of lack of translation. The other language I checked did not have such problems ..... else it was dues to being installed from the user account. OOo is OK in third language also.

Originally I thought my system had been updated but yet when working from the root account it updated a huge number of packages. I was aware my system needed updating and my local repository was selected for the purpose in Synaptic.
I also did an install without a repository selected and got no warning message about it.

This message was a bit odd also ....



[attachment deleted by admin]
« Last Edit: March 16, 2009, 01:44:01 PM by JohnBoy »

Offline Uggla

  • Full Member
  • ***
  • Posts: 206
Re: 2009.1 International, or how to change to a non-English locale
« Reply #3 on: March 16, 2009, 01:38:31 PM »
I run an updated Minime 2008 on my laptop and decided to try your script to see if it could help me to get swedish localization in Synaptic (which I havn't been able to so far). The script seemed to run fine but Synaptic is still in english.  ???

Antje

  • Guest
Re: 2009.1 International, or how to change to a non-English locale
« Reply #4 on: March 16, 2009, 01:43:34 PM »
Quote
The script seemed to run fine but Synaptic is still in english
reinstall synaptic and your synaptic is in swedish. ;)

greetings,
Antje

Offline pinoc

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2841
    • other projects...
Re: 2009.1 International, or how to change to a non-English locale
« Reply #5 on: March 16, 2009, 01:49:40 PM »
Can't stat /home/<user>/.gvfs

The directory appears to have the users permissions but they cannot be changed.
The directory cannot be deleted.
Even root cannot delete this directory!  ???

Permissions
dr-x------

Owner can view only, everyone else is blocked.

I try to get to the directory using super user mode file manager from the user account and the directory does not show!

Should the script be run from the root account, rather than just as root from a user account?

JohnBoy,

no idea how this happens. gvfs sounds to me like gnome virtual file system which for sure has nothing to do with addlocale.   I tested each of the 73 languages against an updated 2009.1 and never encountered this before.  
Running the script as root or as normal user and providing the root password should not make any difference. Can you be more specific? Which language did you select and what do you mean by OOwriter is not compliant?

Please note that some applications may have a less complete translation in some languages. So depending on the chosen language you may get a fully translated PCLOS control center or some parts of it remain in English.

PS: the intermediate Synaptic message can be ignored, just hit ok and let the script finish. 
-p.



Offline Uggla

  • Full Member
  • ***
  • Posts: 206
Re: 2009.1 International, or how to change to a non-English locale
« Reply #6 on: March 16, 2009, 01:51:04 PM »
reinstall synaptic and your synaptic is in swedish. ;)

Tried that, it is still in english.

/Uggla

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: 2009.1 International, or how to change to a non-English locale
« Reply #7 on: March 16, 2009, 01:58:40 PM »
By not compliant I meant that it did not have the new language, which as I later mentioned seems to be because that language did not have it translated.
The .gvfs directory must have errored because the script could not access it ..... I have no idea what it is for or how it got there. I thought at the time it might be something the script placed there ... seems not.

I have installed UK English, Irish and French. The Irish language is obviously not fully translated judging by the others. That is what threw me I guess ... a mix of Irish and English showing in some places.

I did ignore the popup but I presumed it should not be there as it is a left over from the big update, which is why I mentioned it.

Offline pinoc

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2841
    • other projects...
Re: 2009.1 International, or how to change to a non-English locale
« Reply #8 on: March 16, 2009, 02:03:24 PM »
@ kalwisti: sorry, is corrected, thanks for the hint!

@ Uggla: maybe you can try running addlocale again, if it worked for Antje it should also work for you  ;)

@JohnBoy: good to hear this seems to be solved! The gvfs directory must have been there before already and I have no clue why the script should access this at all. Maybe during the update system phase? But then this should also have happened when simply running a synaptic -> update all. The synaptic message indeed is a relict fromn the last big update and once that was applied can be safely ignored.

Offline newmikey

  • Full Member
  • ***
  • Posts: 229
    • More than just a photo - processed with PCLinuxOS
Re: 2009.1 International, or how to change to a non-English locale
« Reply #9 on: March 16, 2009, 02:29:58 PM »
Works as advertised, apart from a few measly issues with ill-behaved programs that do not look at the KDEGLOBALS but have their own setting dialog.

Sterling job and something we have been waiting for for years! We're extremely grateful for this nice addition that will probably increase the appeal of PCLinuxOS incredibly and will finally warrant a change of the age-old blurb "PCLinuxOS is an English-only distro......".

PCLinuxOS is an international distro....!

Very very nice,  Pinoc. From the Dutch and Belgian user community we say "thank you!"

 :D :D :D :D :D
http://www.mike.bing-photography.com
All images processed with Open-Source software on the PCLinuxOS system

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12506
Re: 2009.1 International, or how to change to a non-English locale
« Reply #10 on: March 16, 2009, 03:07:29 PM »
Can't stat /home/<user>/.gvfs

The directory appears to have the users permissions but they cannot be changed.
The directory cannot be deleted.
Even root cannot delete this directory!  ???

Permissions
dr-x------

Owner can view only, everyone else is blocked.

I try to get to the directory using super user mode file manager from the user account and the directory does not show!

Should the script be run from the root account, rather than just as root from a user account?

Sounds like an improper shutdown with some minor file corruption. You probably need to run file check on your system.

Thanks to everyone who donates. You keep the servers running.

Offline JohnW_57

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2115
Re: 2009.1 International, or how to change to a non-English locale
« Reply #11 on: March 16, 2009, 04:08:57 PM »
Hi all

It's easy to check packages for localization:

Start kpackage and you get a full list which packages are installed.
Click on a installed package in the list and click on file list (on the right top) and you see all files in the rpm package.
If you see the rpm have  .mo files ( with a country code like: nl, de, es ) you need to reinstall the package with synaptic to get in your own language.

I know is it's a dull job (needed 2 hours to do before Pinocs script).

Greetings; JohnW
« Last Edit: March 16, 2009, 06:43:58 PM by JohnW »
PCLinuxOS 2013 KDE4 (64 bit) on: home build system:  Intel Core 2 Quad (q6700) (2.66ghz), Asus P5K motherboard, 4 gig ddr2 memory, Asus Nvidia Geforce GTS 250 1024 mb gddr3, Crucial M4 128 SSD,  2x Samsung 500 gig HDD (sata), TSSTcorp CDDVDW SH-224BB.

Offline pinoc

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2841
    • other projects...
Re: 2009.1 International, or how to change to a non-English locale
« Reply #12 on: March 16, 2009, 04:23:28 PM »
@newmikey: great to hear it worked, this is always good news!

@JohnW:
that's correct.  My initial attempts were summarized here: http://www.pclosmag.com/html/Issues/200807/page04.html
The 'safest' solution is the 'shotgun solution' = complete reinstall of anything that is installed but this is crazy and may even create unnecessary problems.  Addlocale is an improved and generalized version of this article which will reinstall only system and essential programs. Yet, I think all language relevant programs of a 2009 install (and some more) are covered. These programs are listed in the script and can easily be modified to suite your personal needs/requirements.

regards,
-pinoc

Offline Ɗα√ϵς§

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5524
  • PCLinuxOS: A revolution in personal computing
Re: 2009.1 International, or how to change to a non-English locale
« Reply #13 on: March 16, 2009, 04:25:56 PM »
I have decided to "sticky" this thread!

Please note that there is an icon for this script, in the Utilities folder.
PCLinuxOS has no wealthy sponsors and can only survive with your donations! Don't wait it might be too late.

Running PCLOS on Athlon II/250 with 2Gb Ram using ASUS M2N68-AM Plus Mobo with Nvidia GF7600GT graphics, and Samsung NC10 Netbook

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: 2009.1 International, or how to change to a non-English locale
« Reply #14 on: March 16, 2009, 04:35:05 PM »
Can't stat /home/<user>/.gvfs

The directory appears to have the users permissions but they cannot be changed.
The directory cannot be deleted.
Even root cannot delete this directory!  ???

Permissions
dr-x------

Owner can view only, everyone else is blocked.

I try to get to the directory using super user mode file manager from the user account and the directory does not show!

Should the script be run from the root account, rather than just as root from a user account?

Sounds like an improper shutdown with some minor file corruption. You probably need to run file check on your system.


Thanks. I'll check that soon.