SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Graphics & Intelligence
          Based Script Technology




     Your Gateway to




                               www.cdac.in
Indian Language Computing
www.cdac.in
By Sundeep Anand
Agenda

   Introduction
   Localization Methods
   Translations:   Portable   Object     &   Native




                                                       www.cdac.in
    Formats, Translation and Filtration
   Localization Sphere
   Localization Mechanics
   Working with „gettext‟
   Developers Checklist
Why developing internationalized applications?
    Localization (l10n) and Internationalization
     (i18n) are means of adapting computer
     software to different languages, regional
     differences and technical requirements of a
     target market.




                                                       www.cdac.in
    Internationalization is a combination of
     developers task and localization. Which
     enables a product to be used with multiple
     scripts and cultures; separating user interface
     resources in a localizable format.
    This concept is also known as NLS (National
     Language Support or Native Language
     Support).
Create language
                 times *.cpp &                           Set Locale
               convert them into                    (LANG/LANGUAGE
                    objects                        Environment variable)
                                                   and Bind Text-Domain

 Link Time     Compile objects to    Run Time
Localization       libraries        Localization




                                                                             www.cdac.in
                                                   Triggering ‘gettext’ to
                                                     fetch strings from
               Compile parent CPP                   message catalogs as
                 with Required                         per set locale.
                    Library
Translations: Portable Objects & Native Formats


Portable Objects
 text file that
  includes the
  original texts and
  the translations.
 language




                                                                        www.cdac.in
  independent

Native Formats
.sdf, .xml, .propertie
s, .ini, .rc,
.yml, .wordfast, .json
, .sub


Machine Objects
 includes the exact same contents as PO file.
 are compiled to binary format and are used for machine translations.
Tools we need to keep in box!
For common platforms: Windows
 Tools      free /non-free Licensed Under Online/Offline Platform Dependency
/1.Linux / Mac
   Pootle    Free          GNU GPL        Online         N/A
 2. Rosetta             Non-free              Online       N/A
 3. Kartouche           Free       GNU GPL    Online       N/A
 4. KBabel              Free       GNU GPL    Offline      Widows/Linux
 5. poEdit              Free                  Offline      Widows/Linux




                                                                             www.cdac.in
 6. Attesoro            Free       GNU GPL    Offline      Linux
 7. passolo             Free       GNU GPL    Offline      Windows
 8. IniTranslator       Free       GNU GPL    Offline      Windows
 9. GTranslator         Free       GNU GPL    Offline      Linux
 10. LocFactoryEditor   Free       GNU GPL    Offline      Mac OS

  Poedit: cross-platform gettext catalogs (.po files) editor, using Poedit we
   can generate .mo files also.
  Translation Toolkit (http://translate.sourceforge.net/wiki/toolkit/index )
   • Convertors:
      moz2po, oo2po, prop2po, php2po, txt2po, po2wordfast, pot2po, csv2
      po, html2po, ini2po, json2po, rc2po
   • Tools: poconflicts, pofilter, pogrep, pomerge, pocompile, poclean
Localization Sphere: Desktop, Web, Mobile
                                                We have i18n support
                                                available    in    every
                                                technology in terms of
                                                API, Framework, Librarie
                                                s etc and they work on
                                                similar concept of run-
                                                time injection, fetching




                                                                       www.cdac.in
                                                strings   from    native
 http://www.endlesslycurious.com/ 2008/10/      format.

An example could be…
 GNU gettext for C, C++ and open source tools
 Microsoft Localization Framework (resource.dll based)
 For Java: Apache Tapestry and International Components for Unicode
 BabelFx for Flash and Flex Rich Internet Applications
 Rails Internationalization (I18n) API for Ruby on Rails
Localization Mechanics

How the things are actually linked up to provide
dynamism in localization: a tool having English
Speaking UI quickly switches to Hindi, thus add
Hindi territory to the list of its lovers!!




                                                   www.cdac.in
Locale – the program – basis of
             localization
     A way to handle localization levels easily…
The locale program writes information about current locale
environment, or all locales to standard output.
Environment variables available to locale aware programs:
1.  LC_CTYPE (Character classification and case conversion)
2.  LC_COLLATE (Collation order)




                                                                               www.cdac.in
3.  LC_TIME (Date and time formats)
4.  LC_NUMERIC (Non-monetary numeric formats)
5.  LC_MONETARY (Monetary formats)
6.  LC_MESSAGES (Formats of informative, diagnostic messages and interactive
    responses)
7. LC_PAPER (Paper size)
8. LC_NAME (Name formats)
9. LC_ADDRESS (Address formats and location information)
10. LC_TELEPHONE (Telephone number formats)
11. LC_MEASUREMENT (Measurement units)
12. LC_IDENTIFICATION (Metadata about the locale information)

LOCPATH: where locale data is stored. Default is /usr/lib/locale
Working with GNU Gettext
Things we need in place…

Required programs for GNOME are:
1. gcc (GNU C Compiler)
2. gettext (GNU Internationalized Utilities)




                                                                   www.cdac.in
3. gettext-base (GNU Internationalized Utilities for the base
   system)
4. libc6 (GNU C Shared Libraries)
5. libc6-dev (GNU C Development Libraries)
6. locales (Common files for locale support)
7. libintl (Message translations system compatible i18n library)
8. php-gettext (read gettext MO files directly through PHP)
9. gtranslator (PO File editor for the GNOME desktop)
10.poedit (gettext catalog editor)
Working with GNU Gettext –
                   Implementation thru ‘C’

#include<stdio.h>
#include<locale.h>          Internationalized ‘Hello World’ Program
#include<libintl.h>

int main(void)
{




                                                                                    www.cdac.in
     /* initializes the entire current locale as per environment variables set by the
     user */
     setlocale(LC_ALL, “”);

     /* sets the base directory for the message catalogs */
    bindtextdomain(“hello”, “.”);

    textdomain(“hello”); /* set domain for future gettext() calls */

     /* allows the translator to work independently from the programmer */
    printf(gettext(“Hello Worldn”));

    return(0);
}
Working with GNU Gettext –
                           Implementation thru ‘C’
Next Steps…
 • Extract strings from
   source file
 • Create the template
   for translations
                                     msginit




                                                                                    www.cdac.in
      xgettext
                              • Create the files to
                                translate using the
                                template
                              • Edit and translate    • Create target directories
                                file.                   in Text Domain Location
                              • Set Project-Id-         bound.
                                Version to            • Compile and install
                                {TextDomain}            translations



                                                              msgfmt
Developers Checklist


Externalize all translatable content – Take the
text out of the code and place in resource files




                                                                      www.cdac.in
  Separating the translatable text from the code will avoid code
  duplication, will let localizers and developers work on updates
  simultaneously and remove the possibility of damaging code during
  translation.
Developers Checklist

Allow input of international data and foreign scripts




                                                                       www.cdac.in
  Input fields often do character validation, so make sure to attach
  the validation rule to the specific country or have the validation
  rule update when country selection changes.
Developers Checklist

Avoid string concatenation




                                                                        www.cdac.in
  Concatenation only works when the content is written for a
  specific language. Avoid constructing strings through concatenation
  as this makes translation hard – even impossible in certain cases.
Developers Checklist

Avoid using given string variable in more
 than one context




                                                                www.cdac.in
   This form will not work for many languages as the verb
   will be different depending on the product name.
   Further, do not use a noun as a parameter in a sentence
   and avoid reusing strings. Translation tools let linguists
   recycle previously translated strings during the
   translation pass.
Developers Checklist

   Do all string handling with Unicode
  Make sure the characters don‟t get corrupt during
  input > database > output route:




                                                                    www.cdac.in
An internationalized application uses Unicode for all handling of
strings and text. This applies to the static text as well as the
dynamic text that is communicated between the application and
the database.
Developers Checklist

Provide extra room for text expansion – User Interface




                                                                     www.cdac.in
    Translated text expands 30% on average with the exception of
    some languages where it may shrink. Leave enough room on
    the layout for expansion and avoid static sizing. If there are
    strings that should not exceed a certain size, always include
    comments in the resource file for those items.
Developers Checklist

Add context information to strings using comments




                                                            www.cdac.in
  A string can be translated to a Indian language in many
  different ways. It is very important to provide context
  information in the resource file when necessary.
Developers Checklist

Use system functions for date/time and numeric formatting




                                                                      www.cdac.in
 Date/time and numeric formatting differ even between the regions
 that speak the same language. Example: dd.mm.yyyy in Bengali; dd-
 mm-yyyy in Kannada, Gujarati, Hindi, Marathi, Punjabi, Tamil; d-m-
 yyyy in Telugu, no leading zeroes.
Developers Checklist

     Externalize all styles and formatting

 Font face, size, style will be different for some languages. In line
  styling will prevent these modifications to be done or require code
  duplication. Always use external style sheets to define styles for a




                                                                              www.cdac.in
  web application.

 Avoid using styling tags such as "em", "strong" and "italic" text. Bold
  font faces cause problems as bold strokes may result in a big blob of
  ink when the font size is small in printing.

 If emphasizing a string is needed with bold font face, we can do it by
  externalizing the style. This way, localizers can decide for font size as
  per need.
Developers Checklist

Use system functions for sorting and string comparison




                                                         www.cdac.in
Developers Checklist

Use system functions for sorting and string comparison




                                                                    www.cdac.in
      http://msdn.microsoft.com/en -us/goglobal/bb688122


  This example has been taken from Microsoft MSDN.
  An internationalized application does not use any manual
  sorting logic and relies on the underlying framework‟s API for
  string comparison. This applies to database data as well as the
  strings that come from resource files, which may be used in
  form elements and others such as combo boxes.
Discussi
ons




                       www.cdac.in
           Thank You
Thank You




www.cdac.in

Weitere ähnliche Inhalte

Was ist angesagt?

Living in a multiligual world: Internationalization for Web 2.0 Applications
Living in a multiligual world: Internationalization for Web 2.0 ApplicationsLiving in a multiligual world: Internationalization for Web 2.0 Applications
Living in a multiligual world: Internationalization for Web 2.0 ApplicationsLars Trieloff
 
Enforcing API Design Rules for High Quality Code Generation
Enforcing API Design Rules for High Quality Code GenerationEnforcing API Design Rules for High Quality Code Generation
Enforcing API Design Rules for High Quality Code GenerationTim Burks
 
The Ring programming language version 1.6 book - Part 6 of 189
The Ring programming language version 1.6 book - Part 6 of 189The Ring programming language version 1.6 book - Part 6 of 189
The Ring programming language version 1.6 book - Part 6 of 189Mahmoud Samir Fayed
 
Microsoft .NET Platform
Microsoft .NET PlatformMicrosoft .NET Platform
Microsoft .NET PlatformPeter R. Egli
 
Web technology slideshare
Web technology slideshareWeb technology slideshare
Web technology slideshareGuruAbirami2
 
Java vs .net
Java vs .netJava vs .net
Java vs .netTech_MX
 
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...Maarten Balliauw
 
List of programming_languages_by_type
List of programming_languages_by_typeList of programming_languages_by_type
List of programming_languages_by_typePhoenix
 
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...adunne
 
Grigory naumovets.multilingual sites.drupal camp kyiv 2011
Grigory naumovets.multilingual sites.drupal camp kyiv 2011Grigory naumovets.multilingual sites.drupal camp kyiv 2011
Grigory naumovets.multilingual sites.drupal camp kyiv 2011camp_drupal_ua
 
Grigory Naumovets.Multilingual sites.DrupalCamp Kyiv 2011
Grigory Naumovets.Multilingual sites.DrupalCamp Kyiv 2011Grigory Naumovets.Multilingual sites.DrupalCamp Kyiv 2011
Grigory Naumovets.Multilingual sites.DrupalCamp Kyiv 2011camp_drupal_ua
 
Open arkcompiler
Open arkcompilerOpen arkcompiler
Open arkcompileryiwei yang
 
Web Programming UNIT VIII notes
Web Programming UNIT VIII notesWeb Programming UNIT VIII notes
Web Programming UNIT VIII notesBhavsingh Maloth
 
CRX 2 Content Application Platform
CRX 2 Content Application PlatformCRX 2 Content Application Platform
CRX 2 Content Application PlatformCédric Hüsler
 

Was ist angesagt? (19)

Living in a multiligual world: Internationalization for Web 2.0 Applications
Living in a multiligual world: Internationalization for Web 2.0 ApplicationsLiving in a multiligual world: Internationalization for Web 2.0 Applications
Living in a multiligual world: Internationalization for Web 2.0 Applications
 
Synapse india reviews sharing asp.net
Synapse india reviews sharing  asp.netSynapse india reviews sharing  asp.net
Synapse india reviews sharing asp.net
 
Analysis
AnalysisAnalysis
Analysis
 
Enforcing API Design Rules for High Quality Code Generation
Enforcing API Design Rules for High Quality Code GenerationEnforcing API Design Rules for High Quality Code Generation
Enforcing API Design Rules for High Quality Code Generation
 
The Ring programming language version 1.6 book - Part 6 of 189
The Ring programming language version 1.6 book - Part 6 of 189The Ring programming language version 1.6 book - Part 6 of 189
The Ring programming language version 1.6 book - Part 6 of 189
 
Microsoft .NET Platform
Microsoft .NET PlatformMicrosoft .NET Platform
Microsoft .NET Platform
 
Web technology slideshare
Web technology slideshareWeb technology slideshare
Web technology slideshare
 
Java vs .net
Java vs .netJava vs .net
Java vs .net
 
thrift-20070401
thrift-20070401thrift-20070401
thrift-20070401
 
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
 
List of programming_languages_by_type
List of programming_languages_by_typeList of programming_languages_by_type
List of programming_languages_by_type
 
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...
 
Grigory naumovets.multilingual sites.drupal camp kyiv 2011
Grigory naumovets.multilingual sites.drupal camp kyiv 2011Grigory naumovets.multilingual sites.drupal camp kyiv 2011
Grigory naumovets.multilingual sites.drupal camp kyiv 2011
 
Grigory Naumovets.Multilingual sites.DrupalCamp Kyiv 2011
Grigory Naumovets.Multilingual sites.DrupalCamp Kyiv 2011Grigory Naumovets.Multilingual sites.DrupalCamp Kyiv 2011
Grigory Naumovets.Multilingual sites.DrupalCamp Kyiv 2011
 
Crosslingual search-engine
Crosslingual search-engineCrosslingual search-engine
Crosslingual search-engine
 
Rails
RailsRails
Rails
 
Open arkcompiler
Open arkcompilerOpen arkcompiler
Open arkcompiler
 
Web Programming UNIT VIII notes
Web Programming UNIT VIII notesWeb Programming UNIT VIII notes
Web Programming UNIT VIII notes
 
CRX 2 Content Application Platform
CRX 2 Content Application PlatformCRX 2 Content Application Platform
CRX 2 Content Application Platform
 

Ähnlich wie Localization (l10n) - The Process

Linux and Localization Tutorial Paras pradhan Senior Linux ...
Linux and Localization Tutorial Paras pradhan Senior Linux ...Linux and Localization Tutorial Paras pradhan Senior Linux ...
Linux and Localization Tutorial Paras pradhan Senior Linux ...webhostingguy
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python ProgrammingAkhil Kaushik
 
Understanding how C program works
Understanding how C program worksUnderstanding how C program works
Understanding how C program worksMindBridgeTech
 
Import golang; struct microservice
Import golang; struct microserviceImport golang; struct microservice
Import golang; struct microserviceGiulio De Donato
 
Kubernetes for the PHP developer
Kubernetes for the PHP developerKubernetes for the PHP developer
Kubernetes for the PHP developerPaul Czarkowski
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with DockerAndrey Hristov
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with DockerAndrey Hristov
 
DevOps Sydney- Building Better Containers with Habitat
DevOps Sydney- Building Better Containers with HabitatDevOps Sydney- Building Better Containers with Habitat
DevOps Sydney- Building Better Containers with HabitatMatt Ray
 
Build Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCBuild Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCTim Burks
 
WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...
WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...
WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...Amir Zmora
 
Internationalize your JavaScript Application: Prepare for "the next billion" ...
Internationalize your JavaScript Application: Prepare for "the next billion" ...Internationalize your JavaScript Application: Prepare for "the next billion" ...
Internationalize your JavaScript Application: Prepare for "the next billion" ...Kevin Hakanson
 
Docker, Cloud Foundry, Bosh & Bluemix
Docker, Cloud Foundry, Bosh & BluemixDocker, Cloud Foundry, Bosh & Bluemix
Docker, Cloud Foundry, Bosh & BluemixIBM
 
The Ring programming language version 1.5.2 book - Part 5 of 181
The Ring programming language version 1.5.2 book - Part 5 of 181The Ring programming language version 1.5.2 book - Part 5 of 181
The Ring programming language version 1.5.2 book - Part 5 of 181Mahmoud Samir Fayed
 

Ähnlich wie Localization (l10n) - The Process (20)

The compilation process
The compilation processThe compilation process
The compilation process
 
Linux and Localization Tutorial Paras pradhan Senior Linux ...
Linux and Localization Tutorial Paras pradhan Senior Linux ...Linux and Localization Tutorial Paras pradhan Senior Linux ...
Linux and Localization Tutorial Paras pradhan Senior Linux ...
 
UnDeveloper Studio
UnDeveloper StudioUnDeveloper Studio
UnDeveloper Studio
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python Programming
 
Introduction to .net
Introduction to .netIntroduction to .net
Introduction to .net
 
Understanding how C program works
Understanding how C program worksUnderstanding how C program works
Understanding how C program works
 
Import golang; struct microservice
Import golang; struct microserviceImport golang; struct microservice
Import golang; struct microservice
 
Kubernetes for the PHP developer
Kubernetes for the PHP developerKubernetes for the PHP developer
Kubernetes for the PHP developer
 
Getting Native with NDK
Getting Native with NDKGetting Native with NDK
Getting Native with NDK
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with Docker
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with Docker
 
DevOps Sydney- Building Better Containers with Habitat
DevOps Sydney- Building Better Containers with HabitatDevOps Sydney- Building Better Containers with Habitat
DevOps Sydney- Building Better Containers with Habitat
 
Build Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCBuild Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPC
 
WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...
WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...
WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...
 
Resume_Up
Resume_UpResume_Up
Resume_Up
 
Internationalize your JavaScript Application: Prepare for "the next billion" ...
Internationalize your JavaScript Application: Prepare for "the next billion" ...Internationalize your JavaScript Application: Prepare for "the next billion" ...
Internationalize your JavaScript Application: Prepare for "the next billion" ...
 
Chapter1
Chapter1Chapter1
Chapter1
 
Docker, Cloud Foundry, Bosh & Bluemix
Docker, Cloud Foundry, Bosh & BluemixDocker, Cloud Foundry, Bosh & Bluemix
Docker, Cloud Foundry, Bosh & Bluemix
 
The Ring programming language version 1.5.2 book - Part 5 of 181
The Ring programming language version 1.5.2 book - Part 5 of 181The Ring programming language version 1.5.2 book - Part 5 of 181
The Ring programming language version 1.5.2 book - Part 5 of 181
 
Docker basics
Docker basicsDocker basics
Docker basics
 

Kürzlich hochgeladen

DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dashnarutouzumaki53779
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 

Kürzlich hochgeladen (20)

DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dash
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 

Localization (l10n) - The Process

  • 1. Graphics & Intelligence Based Script Technology Your Gateway to www.cdac.in Indian Language Computing
  • 3. Agenda  Introduction  Localization Methods  Translations: Portable Object & Native www.cdac.in Formats, Translation and Filtration  Localization Sphere  Localization Mechanics  Working with „gettext‟  Developers Checklist
  • 4. Why developing internationalized applications?  Localization (l10n) and Internationalization (i18n) are means of adapting computer software to different languages, regional differences and technical requirements of a target market. www.cdac.in  Internationalization is a combination of developers task and localization. Which enables a product to be used with multiple scripts and cultures; separating user interface resources in a localizable format.  This concept is also known as NLS (National Language Support or Native Language Support).
  • 5. Create language times *.cpp & Set Locale convert them into (LANG/LANGUAGE objects Environment variable) and Bind Text-Domain Link Time Compile objects to Run Time Localization libraries Localization www.cdac.in Triggering ‘gettext’ to fetch strings from Compile parent CPP message catalogs as with Required per set locale. Library
  • 6. Translations: Portable Objects & Native Formats Portable Objects  text file that includes the original texts and the translations.  language www.cdac.in independent Native Formats .sdf, .xml, .propertie s, .ini, .rc, .yml, .wordfast, .json , .sub Machine Objects includes the exact same contents as PO file. are compiled to binary format and are used for machine translations.
  • 7. Tools we need to keep in box! For common platforms: Windows Tools free /non-free Licensed Under Online/Offline Platform Dependency /1.Linux / Mac Pootle Free GNU GPL Online N/A 2. Rosetta Non-free Online N/A 3. Kartouche Free GNU GPL Online N/A 4. KBabel Free GNU GPL Offline Widows/Linux 5. poEdit Free Offline Widows/Linux www.cdac.in 6. Attesoro Free GNU GPL Offline Linux 7. passolo Free GNU GPL Offline Windows 8. IniTranslator Free GNU GPL Offline Windows 9. GTranslator Free GNU GPL Offline Linux 10. LocFactoryEditor Free GNU GPL Offline Mac OS  Poedit: cross-platform gettext catalogs (.po files) editor, using Poedit we can generate .mo files also.  Translation Toolkit (http://translate.sourceforge.net/wiki/toolkit/index ) • Convertors: moz2po, oo2po, prop2po, php2po, txt2po, po2wordfast, pot2po, csv2 po, html2po, ini2po, json2po, rc2po • Tools: poconflicts, pofilter, pogrep, pomerge, pocompile, poclean
  • 8. Localization Sphere: Desktop, Web, Mobile We have i18n support available in every technology in terms of API, Framework, Librarie s etc and they work on similar concept of run- time injection, fetching www.cdac.in strings from native http://www.endlesslycurious.com/ 2008/10/ format. An example could be…  GNU gettext for C, C++ and open source tools  Microsoft Localization Framework (resource.dll based)  For Java: Apache Tapestry and International Components for Unicode  BabelFx for Flash and Flex Rich Internet Applications  Rails Internationalization (I18n) API for Ruby on Rails
  • 9. Localization Mechanics How the things are actually linked up to provide dynamism in localization: a tool having English Speaking UI quickly switches to Hindi, thus add Hindi territory to the list of its lovers!! www.cdac.in
  • 10. Locale – the program – basis of localization A way to handle localization levels easily… The locale program writes information about current locale environment, or all locales to standard output. Environment variables available to locale aware programs: 1. LC_CTYPE (Character classification and case conversion) 2. LC_COLLATE (Collation order) www.cdac.in 3. LC_TIME (Date and time formats) 4. LC_NUMERIC (Non-monetary numeric formats) 5. LC_MONETARY (Monetary formats) 6. LC_MESSAGES (Formats of informative, diagnostic messages and interactive responses) 7. LC_PAPER (Paper size) 8. LC_NAME (Name formats) 9. LC_ADDRESS (Address formats and location information) 10. LC_TELEPHONE (Telephone number formats) 11. LC_MEASUREMENT (Measurement units) 12. LC_IDENTIFICATION (Metadata about the locale information) LOCPATH: where locale data is stored. Default is /usr/lib/locale
  • 11. Working with GNU Gettext Things we need in place… Required programs for GNOME are: 1. gcc (GNU C Compiler) 2. gettext (GNU Internationalized Utilities) www.cdac.in 3. gettext-base (GNU Internationalized Utilities for the base system) 4. libc6 (GNU C Shared Libraries) 5. libc6-dev (GNU C Development Libraries) 6. locales (Common files for locale support) 7. libintl (Message translations system compatible i18n library) 8. php-gettext (read gettext MO files directly through PHP) 9. gtranslator (PO File editor for the GNOME desktop) 10.poedit (gettext catalog editor)
  • 12. Working with GNU Gettext – Implementation thru ‘C’ #include<stdio.h> #include<locale.h> Internationalized ‘Hello World’ Program #include<libintl.h> int main(void) { www.cdac.in /* initializes the entire current locale as per environment variables set by the user */ setlocale(LC_ALL, “”); /* sets the base directory for the message catalogs */ bindtextdomain(“hello”, “.”); textdomain(“hello”); /* set domain for future gettext() calls */ /* allows the translator to work independently from the programmer */ printf(gettext(“Hello Worldn”)); return(0); }
  • 13. Working with GNU Gettext – Implementation thru ‘C’ Next Steps… • Extract strings from source file • Create the template for translations msginit www.cdac.in xgettext • Create the files to translate using the template • Edit and translate • Create target directories file. in Text Domain Location • Set Project-Id- bound. Version to • Compile and install {TextDomain} translations msgfmt
  • 14. Developers Checklist Externalize all translatable content – Take the text out of the code and place in resource files www.cdac.in Separating the translatable text from the code will avoid code duplication, will let localizers and developers work on updates simultaneously and remove the possibility of damaging code during translation.
  • 15. Developers Checklist Allow input of international data and foreign scripts www.cdac.in Input fields often do character validation, so make sure to attach the validation rule to the specific country or have the validation rule update when country selection changes.
  • 16. Developers Checklist Avoid string concatenation www.cdac.in Concatenation only works when the content is written for a specific language. Avoid constructing strings through concatenation as this makes translation hard – even impossible in certain cases.
  • 17. Developers Checklist Avoid using given string variable in more than one context www.cdac.in This form will not work for many languages as the verb will be different depending on the product name. Further, do not use a noun as a parameter in a sentence and avoid reusing strings. Translation tools let linguists recycle previously translated strings during the translation pass.
  • 18. Developers Checklist Do all string handling with Unicode Make sure the characters don‟t get corrupt during input > database > output route: www.cdac.in An internationalized application uses Unicode for all handling of strings and text. This applies to the static text as well as the dynamic text that is communicated between the application and the database.
  • 19. Developers Checklist Provide extra room for text expansion – User Interface www.cdac.in Translated text expands 30% on average with the exception of some languages where it may shrink. Leave enough room on the layout for expansion and avoid static sizing. If there are strings that should not exceed a certain size, always include comments in the resource file for those items.
  • 20. Developers Checklist Add context information to strings using comments www.cdac.in A string can be translated to a Indian language in many different ways. It is very important to provide context information in the resource file when necessary.
  • 21. Developers Checklist Use system functions for date/time and numeric formatting www.cdac.in Date/time and numeric formatting differ even between the regions that speak the same language. Example: dd.mm.yyyy in Bengali; dd- mm-yyyy in Kannada, Gujarati, Hindi, Marathi, Punjabi, Tamil; d-m- yyyy in Telugu, no leading zeroes.
  • 22. Developers Checklist Externalize all styles and formatting  Font face, size, style will be different for some languages. In line styling will prevent these modifications to be done or require code duplication. Always use external style sheets to define styles for a www.cdac.in web application.  Avoid using styling tags such as "em", "strong" and "italic" text. Bold font faces cause problems as bold strokes may result in a big blob of ink when the font size is small in printing.  If emphasizing a string is needed with bold font face, we can do it by externalizing the style. This way, localizers can decide for font size as per need.
  • 23. Developers Checklist Use system functions for sorting and string comparison www.cdac.in
  • 24. Developers Checklist Use system functions for sorting and string comparison www.cdac.in http://msdn.microsoft.com/en -us/goglobal/bb688122 This example has been taken from Microsoft MSDN. An internationalized application does not use any manual sorting logic and relies on the underlying framework‟s API for string comparison. This applies to database data as well as the strings that come from resource files, which may be used in form elements and others such as combo boxes.
  • 25. Discussi ons www.cdac.in Thank You