Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've heard that is possible to build customized versions of Ubuntu in different languages. What are these and how can I make one?

share|improve this question
add comment

1 Answer 1

up vote 14 down vote accepted

What is an Ubuntu localized image?

Due to space restrictions, the official Ubuntu installation CDs (also known as ISO images) that can be downloaded from ubuntu.com contain only a handful of the many languages in which Ubuntu is available. Any additional languages can then be downloaded during or after the installation.

Localized images are customized versions of the original media, which are modified to include the translation of a particular language or other modifications that are relevant to a particular location.

They make it possible to have native language support upon installation and without the need of a working Internet connection. In addition to the language, they also enable customizing other aspects of Ubuntu to make it more relevant to a particular culture or region.

How can I create a localized image?

Set up the tools

Set up a defaults package

The next step is to create a defaults package with all the customizations for your language. This package will be used as a template containing the parameters to build the final image.

Now run the build script to create the default package:

ubuntu-defaults-template {defaultspackagename}
cd {defaultspackagename}

Remember to substitute {defaultspackagename} by the name of your package. The convention for package names is ubuntu-defaults-{locale}, where {locale} is the 2-letter or 3-letter ISO 639-2 code for your locale. E.g. a defaults package for a Catalan-speaking region would be ubuntu-defaults-ca

At this point you can modify all the relevant settings to your locale in the .txt files in that directory. They are all documented and contain examples.

Build the defaults package

What you created in the previous step is a source package, which you now need to build in order to make it an installable package.

Now run the following command to build the package:

dpkg-buildpackage

If all goes well, you'll have a package with a .deb extension on the parent folder. Something like myprojectdefaults_0.1_all.deb

Build your ISO image from the local package

Now run the command to create the image. You will need a working Internet connection and a couple of GB free to be able to run the command. This will take some minutes to complete-

ubuntu-defaults-image --package  ../myprojectdefaults_0.1_all.deb

The resulting image is the one with the .iso extension

Note: as an alternative to using a local package, you can set up a PPA and use the following command (this example assumes you've named your package ubuntu-defaults-ca in the PPA):

ubuntu-defaults-image --ppa  lpusername/ppaname  --locale ca

Check out the man page to learn about additional options

Test

Do a local test of your image (e.g. you can install it in a virtual machine with Virtualbox)

Finally, upload the image on a public location for everyone to download and test.

That's it!

Example 1: creating a localized image for Catalan from a package

Assuming all tools are installed, we can just run the commands to create a localized ISO for Catalan-speaking regions:

ubuntu-defaults-template ubuntu-defaults-ca
cd ubuntu-defaults-ca

At this point we modify the required files to install the Catalan language packs and select the Catalan keyboard. We modify the following files:

  • i18n/keyboard.txt -> specifying 'es cat' as the keyboard
  • i18n/langpacks.txt -> specifying 'ca complete' as a language pack
  • i18n/language.txt -> specifying 'ca' as the language code

And then we continue building the defaults package and the image:

dpkg-buildpackage
ubuntu-defaults-image --package ../ubuntu-defaults-ca_0.1_all.deb

Example 2: creating a localized image for Catalan from a PPA

This example assumes we've already created a PPA with a defaults package, so the only thing we'll need to do will be to run the command to respin the ISO:

ubuntu-defaults-image --ppa dpm/ubuntu-defaults-ca --locale ca
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.