SlideShare a Scribd company logo
GNU Internationalization and localization -Joe Turner 8 March 2007
Agenda What is i18n, l10n, and a locale? Linux and l10n The GNU process Programmers’ View of the Process Translator’s View 05/28/09 - Joe Turner
Internationalization (i18n) Internationalization is the process of planning and implementing products and services so that they can easily be adapted to specific local languages and cultures, a process called  localization .  Internationalization comes in several variants: Monolingual internationalization  - Enables the creation of localized versions of a product, where each localized version supports only its target locale. This is no longer sufficient for business requirements.  Internationalization for multilocalization  - Supports localization and data processing for multiple locales, where the actual locale is selected on execution of the product or at runtime. Multilingualization  - Enables data processing and display in multiple languages and locales simultaneously, for example, mixing Chinese and Arabic text in a single document.  05/28/09 - Joe Turner
Localization (L10n)   Localization is the process of adapting software for a particular country or region; The adaptation of a product, application or document content to meet the language, cultural, and other requirements of a specific target market. Examples of Localization: Translation of the user interface and documentation into a different language.  Altering some format fields in resource files according to the locale conventions, for example, changing a date format from mm/dd/yy to yy/mm/dd.  Adding code modules that implement locale-specific functionality, such as an input method editor for Japanese or a module that calculates Hebrew calendar dates. 05/28/09 - Joe Turner
Locale A  locale  is a set of parameters that defines the user's language, country and cultural rules. A locale is a specific geographical, political, or cultural region. It is usually identified by a combination of language and country, for example, en_US represents the locale US English.  es is Spanish; es_MX is Mexican Spanish pt is Portuguese, pt_BR is Brazilian Portuguese en is English; en_US is US English 05/28/09 - Joe Turner
Linux and L10n The Linux l10n software architecture is based on the GNU “gettext” tool suite, together with a range of gettext compatible translator’s tools such as KBabel, PO-Edit, GTranslator and others.  Gettext allows identifying translatable strings in the Linux source code and extracting them into a format suitable for KBabel and the other l10n tools. This l10n architecture is shared by the majority of open-source projects, forming the de-facto standard in open-source related l10n.  The l10n “market” of gettext is organized as groups of volunteers from the target language countries. Most of these volunteers are university students who are using the software for their own purposes.  05/28/09 - Joe Turner
05/28/09 - Joe Turner Linux l10n Process
Linux l10n Process 05/28/09 - Joe Turner xgettext msgmerge msgfmt Professional Translator My_Application.mo Java Sources keys.pot C++ Sources es_MX.po fr.po pt_br.po en.po
GNU gettext Included with glibc Supports: C, C++, PHP, Java, Others Utilities: gettext msgmerge msgfmt 05/28/09 - Joe Turner
Users’ View $LANG environment variable points to native language: $ echo $LANG en_US.UTF-8 Applications set locale and pick up the translation files.  05/28/09 - Joe Turner
Where are the files? gettext works by expecting a locale directory where all of the translated strings are kept, in the following structure:  /locale (/usr/share/locale) /en <-language code /LC_MESSAGES  messages.po  messages.mo  05/28/09 - Joe Turner
Programmers’ Role Mark text that needs to be translated for each shared object Example: #include <libintl.h> printf(gettext(“temperature :%d\n”), temp); 05/28/09 - Joe Turner
Special Cases static const char *messages[] =  {  &quot;some very meaningful message&quot;,  &quot;and another one&quot;  };  const char *string;  ...  string = index > 1 ? &quot;a default message&quot; : messages[index]; fputs (string);  ...   05/28/09 - Joe Turner
Special Cases #define gettext_noop(String) (String)   static const char *messages[] = {  gettext_noop  (&quot;some very meaningful message&quot;),  gettext_noop  (&quot;and another one&quot;)  };  const char *string;  ...  string = index > 1 ?  gettext  (&quot;a default message&quot;) :  gettext  (messages[index]);  fputs (string);  ...  }  05/28/09 - Joe Turner
Plural Forms English:  I have 1 apple.  I have 2 apples. C/English:  if (n==1) printf(“I have %d apple.”, n) else printf (“I have %d apples.”, n); Other languages have multiple plural forms.  Our solution: let the translator handle it.  printf( ngettext(“I have %d apple.”, “I have %d apples.”, n), n); 05/28/09 - Joe Turner
Translators’ Role Translate the files and return them to us. Several free utilities to help 05/28/09 - Joe Turner
05/28/09 - Joe Turner
Java Support 05/28/09 - Joe Turner

More Related Content

PDF
RProtoBuf: protocol buffers for R
PPTX
Backus Naur and Chomsky Normal Forms
PDF
Php packages
ODP
Developing Multilingual Applications
PDF
Doppl development iteration #10
PDF
C program structure
PDF
C datatypes
PPTX
Ryan hamahashi 10x10 presentation
RProtoBuf: protocol buffers for R
Backus Naur and Chomsky Normal Forms
Php packages
Developing Multilingual Applications
Doppl development iteration #10
C program structure
C datatypes
Ryan hamahashi 10x10 presentation

What's hot (6)

PDF
Universal dependencies for Finnish
PDF
Methods and apparatus for automatic translation of a computer program languag...
PPT
Information for learning object exchange
PDF
PDF
IDL to C++11 initial submission presentation
PPTX
Etymology Markup in TEI XML
Universal dependencies for Finnish
Methods and apparatus for automatic translation of a computer program languag...
Information for learning object exchange
IDL to C++11 initial submission presentation
Etymology Markup in TEI XML
Ad

Viewers also liked (9)

PPT
Software Internationalization Crash Course
PDF
Internationalization in Java
PDF
Learn to Internationalize your Applications - Sun Tech Days 2009
PDF
DataFX - JavaOne 2013
PPT
Simple 20 Minute Code Review
PDF
DataFX 8 (JavaOne 2014)
PPT
Anatomia pelvica y pelvimetria
PPTX
JavaFX Versus HTML5 - JavaOne 2014
PPT
Extended definitions
Software Internationalization Crash Course
Internationalization in Java
Learn to Internationalize your Applications - Sun Tech Days 2009
DataFX - JavaOne 2013
Simple 20 Minute Code Review
DataFX 8 (JavaOne 2014)
Anatomia pelvica y pelvimetria
JavaFX Versus HTML5 - JavaOne 2014
Extended definitions
Ad

Similar to GNU Internationalization Presentation (20)

PPTX
Localization (l10n) - The Process
PPT
Linux and Localization Tutorial Paras pradhan Senior Linux ...
PDF
O Proxecto Trasno, LSWC '12
PDF
Localisation
PDF
Translating Open Source Apps
PDF
Quality translations in GNOME
PPT
WCRI 2015 I18N L10N
PDF
Internationalizing Ubuntu apps
PPT
What Every Translator Should Know About Software Localization
PDF
Living in a multiligual world: Internationalization for Web 2.0 Applications
PDF
Make FLOSS Speak Your Language
PPTX
Creating multillingual apps for android
PDF
Crossing the border with Qt: the i18n system
PPTX
Continuous Software Internationalization (i18n) & Localization (L10n) Sandbox
ODP
FOSS localisation in minorised languages
PDF
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...
PDF
Language, Culture, and Software
PDF
WordForge Localization Editor
PDF
WordForge Localization Editor
KEY
Multilingual websites with Mura CMS (MuraCon 2012)
Localization (l10n) - The Process
Linux and Localization Tutorial Paras pradhan Senior Linux ...
O Proxecto Trasno, LSWC '12
Localisation
Translating Open Source Apps
Quality translations in GNOME
WCRI 2015 I18N L10N
Internationalizing Ubuntu apps
What Every Translator Should Know About Software Localization
Living in a multiligual world: Internationalization for Web 2.0 Applications
Make FLOSS Speak Your Language
Creating multillingual apps for android
Crossing the border with Qt: the i18n system
Continuous Software Internationalization (i18n) & Localization (L10n) Sandbox
FOSS localisation in minorised languages
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...
Language, Culture, and Software
WordForge Localization Editor
WordForge Localization Editor
Multilingual websites with Mura CMS (MuraCon 2012)

Recently uploaded (20)

PPTX
Probability Distribution, binomial distribution, poisson distribution
PPTX
Principles of Marketing, Industrial, Consumers,
PDF
How to Get Funding for Your Trucking Business
DOCX
Euro SEO Services 1st 3 General Updates.docx
DOCX
Business Management - unit 1 and 2
PDF
Power and position in leadershipDOC-20250808-WA0011..pdf
PDF
IFRS Notes in your pocket for study all the time
PPTX
ICG2025_ICG 6th steering committee 30-8-24.pptx
PDF
SIMNET Inc – 2023’s Most Trusted IT Services & Solution Provider
PPTX
AI-assistance in Knowledge Collection and Curation supporting Safe and Sustai...
PDF
NISM Series V-A MFD Workbook v December 2024.khhhjtgvwevoypdnew one must use ...
PPT
Data mining for business intelligence ch04 sharda
PPTX
Lecture (1)-Introduction.pptx business communication
PPT
340036916-American-Literature-Literary-Period-Overview.ppt
PPTX
5 Stages of group development guide.pptx
PDF
Katrina Stoneking: Shaking Up the Alcohol Beverage Industry
PDF
kom-180-proposal-for-a-directive-amending-directive-2014-45-eu-and-directive-...
PDF
Reconciliation AND MEMORANDUM RECONCILATION
DOCX
unit 2 cost accounting- Tender and Quotation & Reconciliation Statement
PDF
Laughter Yoga Basic Learning Workshop Manual
Probability Distribution, binomial distribution, poisson distribution
Principles of Marketing, Industrial, Consumers,
How to Get Funding for Your Trucking Business
Euro SEO Services 1st 3 General Updates.docx
Business Management - unit 1 and 2
Power and position in leadershipDOC-20250808-WA0011..pdf
IFRS Notes in your pocket for study all the time
ICG2025_ICG 6th steering committee 30-8-24.pptx
SIMNET Inc – 2023’s Most Trusted IT Services & Solution Provider
AI-assistance in Knowledge Collection and Curation supporting Safe and Sustai...
NISM Series V-A MFD Workbook v December 2024.khhhjtgvwevoypdnew one must use ...
Data mining for business intelligence ch04 sharda
Lecture (1)-Introduction.pptx business communication
340036916-American-Literature-Literary-Period-Overview.ppt
5 Stages of group development guide.pptx
Katrina Stoneking: Shaking Up the Alcohol Beverage Industry
kom-180-proposal-for-a-directive-amending-directive-2014-45-eu-and-directive-...
Reconciliation AND MEMORANDUM RECONCILATION
unit 2 cost accounting- Tender and Quotation & Reconciliation Statement
Laughter Yoga Basic Learning Workshop Manual

GNU Internationalization Presentation

  • 1. GNU Internationalization and localization -Joe Turner 8 March 2007
  • 2. Agenda What is i18n, l10n, and a locale? Linux and l10n The GNU process Programmers’ View of the Process Translator’s View 05/28/09 - Joe Turner
  • 3. Internationalization (i18n) Internationalization is the process of planning and implementing products and services so that they can easily be adapted to specific local languages and cultures, a process called localization . Internationalization comes in several variants: Monolingual internationalization - Enables the creation of localized versions of a product, where each localized version supports only its target locale. This is no longer sufficient for business requirements. Internationalization for multilocalization - Supports localization and data processing for multiple locales, where the actual locale is selected on execution of the product or at runtime. Multilingualization - Enables data processing and display in multiple languages and locales simultaneously, for example, mixing Chinese and Arabic text in a single document. 05/28/09 - Joe Turner
  • 4. Localization (L10n) Localization is the process of adapting software for a particular country or region; The adaptation of a product, application or document content to meet the language, cultural, and other requirements of a specific target market. Examples of Localization: Translation of the user interface and documentation into a different language. Altering some format fields in resource files according to the locale conventions, for example, changing a date format from mm/dd/yy to yy/mm/dd. Adding code modules that implement locale-specific functionality, such as an input method editor for Japanese or a module that calculates Hebrew calendar dates. 05/28/09 - Joe Turner
  • 5. Locale A locale is a set of parameters that defines the user's language, country and cultural rules. A locale is a specific geographical, political, or cultural region. It is usually identified by a combination of language and country, for example, en_US represents the locale US English. es is Spanish; es_MX is Mexican Spanish pt is Portuguese, pt_BR is Brazilian Portuguese en is English; en_US is US English 05/28/09 - Joe Turner
  • 6. Linux and L10n The Linux l10n software architecture is based on the GNU “gettext” tool suite, together with a range of gettext compatible translator’s tools such as KBabel, PO-Edit, GTranslator and others. Gettext allows identifying translatable strings in the Linux source code and extracting them into a format suitable for KBabel and the other l10n tools. This l10n architecture is shared by the majority of open-source projects, forming the de-facto standard in open-source related l10n. The l10n “market” of gettext is organized as groups of volunteers from the target language countries. Most of these volunteers are university students who are using the software for their own purposes. 05/28/09 - Joe Turner
  • 7. 05/28/09 - Joe Turner Linux l10n Process
  • 8. Linux l10n Process 05/28/09 - Joe Turner xgettext msgmerge msgfmt Professional Translator My_Application.mo Java Sources keys.pot C++ Sources es_MX.po fr.po pt_br.po en.po
  • 9. GNU gettext Included with glibc Supports: C, C++, PHP, Java, Others Utilities: gettext msgmerge msgfmt 05/28/09 - Joe Turner
  • 10. Users’ View $LANG environment variable points to native language: $ echo $LANG en_US.UTF-8 Applications set locale and pick up the translation files. 05/28/09 - Joe Turner
  • 11. Where are the files? gettext works by expecting a locale directory where all of the translated strings are kept, in the following structure: /locale (/usr/share/locale) /en <-language code /LC_MESSAGES messages.po messages.mo 05/28/09 - Joe Turner
  • 12. Programmers’ Role Mark text that needs to be translated for each shared object Example: #include <libintl.h> printf(gettext(“temperature :%d\n”), temp); 05/28/09 - Joe Turner
  • 13. Special Cases static const char *messages[] = { &quot;some very meaningful message&quot;, &quot;and another one&quot; }; const char *string; ... string = index > 1 ? &quot;a default message&quot; : messages[index]; fputs (string); ... 05/28/09 - Joe Turner
  • 14. Special Cases #define gettext_noop(String) (String) static const char *messages[] = { gettext_noop (&quot;some very meaningful message&quot;), gettext_noop (&quot;and another one&quot;) }; const char *string; ... string = index > 1 ? gettext (&quot;a default message&quot;) : gettext (messages[index]); fputs (string); ... } 05/28/09 - Joe Turner
  • 15. Plural Forms English: I have 1 apple. I have 2 apples. C/English: if (n==1) printf(“I have %d apple.”, n) else printf (“I have %d apples.”, n); Other languages have multiple plural forms. Our solution: let the translator handle it. printf( ngettext(“I have %d apple.”, “I have %d apples.”, n), n); 05/28/09 - Joe Turner
  • 16. Translators’ Role Translate the files and return them to us. Several free utilities to help 05/28/09 - Joe Turner
  • 17. 05/28/09 - Joe Turner
  • 18. Java Support 05/28/09 - Joe Turner