Docs/Howto/One Tune Locales

From Mandriva Community Wiki

Jump to: navigation, search
HowTo fine tune the locales of a One installation

Whatever Mandriva One version you just installed, it will probably come with more languages than you need. It will waste disk space (around 300MB) and bandwidth, because all updates will also download languages updates.

NB: this doesn't apply to standard installations, only One is concerned.

You will find here a detailed way to remove the unneeded locales, and tune your system locale as much as you want. You will only do that after the install, so you can do it at any time later. The language used for the example below is portuguese pt_PT, but you will of course replace it by your real language.

Portuguese is interesting as example because it has variants (pt_PT, pt_BR).

Contents

[edit] Packages cleanup

[edit] Adding the needed

If your language was not in the One defaults (your desktop is in english), you still may add the needed packages manually now. Here is a list of the programs which have languages in a separate package.

  • KDE : package kde-i18n-pt
  • GNOME : unfortunately, no specific package
  • XFCE : unfortunately, no specific package
  • KDE4 : package kde-l10n-pt
  • Firefox : package mozilla-firefox-pt_PT
  • OpenOffice.Org : package openoffice.org-l10n-pt and openoffice.org-help-pt

[edit] Removing the unneeded

With the "Add/Remove software" tool, search for "locales", with the filter "All". Then remove all locales-xx where xx is not your language. For portuguese - either pt_PT or pt_BR, you only need locales-pt as example.

If your language has variants like our example, you may want to remove the unneeded. For pt_PT, we don't need pt_BR. So you can search pt_BR packages and also remove them.

[edit] Get the boot messages localised

Mandriva One still doesn't feature localised boot messages. You can get them with a trick : soft link the /usr/share/locale/your_locale directory to /etc/locale/your_locale :

ln -s /usr/share/locale/pt /etc/locale/pt

[edit] Tell RPM what languages you want

The rpm packaging system uses a macro file to decide which languages to install when a software is added or updated. This file is /etc/rpm/macros. You should edit the only line it contains to remove the unneeded languages.

So the line

%_install_langs _:de_DE:es_ES:fr:fr_FR:it_IT:nl_NL:no_NY:pl_PL:pt:pt_BR:pt_PT:ru_RU

goes to

%_install_langs _:pt:pt_PT

in our example. Even if this doesn't change anything for the already installed packages, any time you re-install or update a software, it will get only the languages you asked.

NB: Of course, you should re-install any software which appears to you in english at this point. Be carefull, you should not remove the base packages to do that, or you will break your system.

[edit] Last cleanup

If you really want to remove any file in a language you'll never understand, you can remove the directories in /usr/share/locale corresponding to any unwanted language. Example (still only keeping pt_PT) :

cd /usr/share/locale && rm -rf de en* es* fr* it nb nl nn no pl pt_BR ru

Now, if you adapted this how to to your language, you should have a much cleaner system.

Personal tools