AddingNewLanguage

Differences between revisions 7 and 10 (spanning 3 versions)
Revision 7 as of 2009-10-23 10:00:01
Size: 2885
Editor: 69
Comment: Added examples and links
Revision 10 as of 2009-12-24 06:28:18
Size: 4068
Editor: p54A63B88
Comment:
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
Before a new translation team can effectively use Launchpad for translations, there must be a font, keyboard, and locale available to be used in Ubuntu.  There are many languages where some or none of these items are not in place. This page will describe a few things that must be submitted that will help the language support for a language. ||<tablestyle="float:right; font-size: 0.9em; width:40%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;"><<TableOfContents>>||

Before a new translation team can effectively use Launchpad for translations, there must be a '''locale''', '''keyboard''' and if necessary a '''font''' for the given language. There are many languages where some or none of these items are in place. This page will describe a few things that must be submitted that will help the language support for a language.
Line 12: Line 14:
 * Creating a glibc locale The first step for being able to use translations in a Linux system is for the language's locale to be defined in the glibc library.

 * Resources with instructions on creating a glibc locale:
  * [[http://sourceware.org/git/?p=glibc.git;a=blob;f=localedata/README;h=f05bf15cebb64284f0872357c8c68c8105e7c73f;hb=HEAD|Glibc Documentation]]
  * [[http://translate.sourceforge.net/wiki/guide/locales/glibc|Translate Toolkit project documentation]]
Line 17: Line 23:
To be able to use a new locale in Open``Office.org [[http://wiki.services.openoffice.org/wiki/How_to_submit_new_Locale_Data|additional steps]] are required.
Line 19: Line 27:
== Fontconfig and Orthographic Information ==

Useful information to gather before localization is the orthographic information. This includes the Unicode Code Points that are used to display the characters that make up a written language.

Fontconfig uses these in orth files. These orth files are named after the ISO-639-3 code. For instance the orth file for Secwepemctsin would be shs.orth and the orth file for English would be en.orth.

Before collecting this information it would be good to download the upstream source files and look through the fc-lang directory for a list of the languages which have orthographic information. If your language is not found then you can submit your own information. Many of the North American Indigenous languages are missing orthographic information, as well as many other languages.

If you're language is not included in fontconfig you can collect the orthographic information and submit it to the upstream source. You could then talk with the Ubuntu fontconfig maintainers to see if the next release will contain your information, if not then you can ask them to included a patched version of fontconfig until they bymp the release.

 * Example: http://cgit.freedesktop.org/fontconfig/tree/fc-lang/ps_af.orth and http://cgit.freedesktop.org/fontconfig/tree/fc-lang/ps_pk.orth
Mozilla projects also require [[https://wiki.mozilla.org/L10n:Starting_a_localization|additional steps]] to use a new locale.
Line 33: Line 31:
Once orthographic information is part of Fontconfig one can use fc-list to determine which fonts that can be used to display your language. === Fontconfig and Orthographic Information ===

Useful information to gather before localization is the orthographic information. This includes the '''Unicode Code Points''' that are used to display the characters that make up a written language.

Fontconfig uses these in '''orth files'''. Orth files are named after the [[http://en.wikipedia.org/wiki/ISO_639-3|ISO-639-3]] code. For instance, the orth file for Secwepemctsin would be shs.orth and the orth file for English would be en.orth.

Before collecting this information it would be good to download the upstream source files and look through the `fc-lang` directory for a list of the languages which have orthographic information. If your language is not found then you can submit your own information. Many of the North American Indigenous languages are missing orthographic information, as well as many other languages.

If your language is not included in fontconfig you can collect the orthographic information and submit it to the upstream source. You can then talk with the Ubuntu fontconfig maintainers to see if the next release will contain your information. If not then you can ask them to included a patched version of fontconfig until they bump the release.

 * Examples:
  * [[http://cgit.freedesktop.org/fontconfig/tree/fc-lang/ps_af.orth|Orth file for Pashto in Afghanistan]]
  * [[http://cgit.freedesktop.org/fontconfig/tree/fc-lang/ps_pk.orth|Orth file for Pashto in Pakistan]]

=== Fonts associated to the language ===

Once orthographic information is part of Fontconfig one can use `fc-list` to determine which fonts that can be used to display your language.
Line 37: Line 51:
Some languages need special keyboard layouts to easily input all of their characters.   There are various ways to do this a common and easy way to is create a xkb layout. This is then submitted to xkeyboard-config at freedesktop.org. Some languages need special keyboard layouts to easily input all of their characters. There are various ways to do this. A common and easy way to is create an '''xkb layout'''. This is then submitted to xkeyboard-config at freedesktop.org.
Line 39: Line 53:
Before you start creating a keyboard you should read the [[http://www.freedesktop.org/wiki/Software/XKeyboardConfig/Rules|submission rules]]. It is not to difficult to create a new layout.   The easiest way is to copy a keyboard that is similar to your keyboard with the added characters needed to type in your language. Before you start creating a keyboard you should read the [[http://www.freedesktop.org/wiki/Software/XKeyboardConfig/Rules|submission rules]]. It is not to difficult to create a new layout. The easiest way is to copy a keyboard that is similar to your keyboard with the added characters needed to type in your language.
Line 41: Line 55:
Put example here.  * Reference:
  * [[http://hektor.umcs.lublin.pl/~mikosmul/computing/articles/custom-keyboard-layouts-xkb.html|Creating a custom XKB layout]]

Before a new translation team can effectively use Launchpad for translations, there must be a locale, keyboard and if necessary a font for the given language. There are many languages where some or none of these items are in place. This page will describe a few things that must be submitted that will help the language support for a language.

Locales

POSIX

The first step for being able to use translations in a Linux system is for the language's locale to be defined in the glibc library.

OpenOffice.org

To be able to use a new locale in OpenOffice.org additional steps are required.

Mozilla

Mozilla projects also require additional steps to use a new locale.

Fonts

Fontconfig and Orthographic Information

Useful information to gather before localization is the orthographic information. This includes the Unicode Code Points that are used to display the characters that make up a written language.

Fontconfig uses these in orth files. Orth files are named after the ISO-639-3 code. For instance, the orth file for Secwepemctsin would be shs.orth and the orth file for English would be en.orth.

Before collecting this information it would be good to download the upstream source files and look through the fc-lang directory for a list of the languages which have orthographic information. If your language is not found then you can submit your own information. Many of the North American Indigenous languages are missing orthographic information, as well as many other languages.

If your language is not included in fontconfig you can collect the orthographic information and submit it to the upstream source. You can then talk with the Ubuntu fontconfig maintainers to see if the next release will contain your information. If not then you can ask them to included a patched version of fontconfig until they bump the release.

Fonts associated to the language

Once orthographic information is part of Fontconfig one can use fc-list to determine which fonts that can be used to display your language.

Keyboards

Some languages need special keyboard layouts to easily input all of their characters. There are various ways to do this. A common and easy way to is create an xkb layout. This is then submitted to xkeyboard-config at freedesktop.org.

Before you start creating a keyboard you should read the submission rules. It is not to difficult to create a new layout. The easiest way is to copy a keyboard that is similar to your keyboard with the added characters needed to type in your language.

Additional sources


CategoryTranslations

Translations/KnowledgeBase/AddingNewLanguage (last edited 2011-03-22 10:56:04 by 226)