SlideShare a Scribd company logo
1 of 75
Download to read offline
Here comes localize.drupal.org
      Gábor Hojtsy, Acquia, Drupalcon Paris
ME

• Needed   a translated Drupal in 2003

• Became locale.module maintainer,
 Drupal 6 core committer
• Developed   all kinds of translation tools

• Working   for Acquia
YOU

• Running   translated Drupal sites?

• Translating   modules for “self”?

• Contributing   to drupal.org translations?

• Writing   & translating modules to “self”?
Take a walk
2001 Jan 22
            t() is born

Drupal

   1.0.0                     2.0.0                 3.0.0



           2001 Feb
        locale.module,
     translation interface      Drupal.org


                                     Disclaimer: time scale not exact
2004 Aug
  2002 Jan               Gettext based sharing,
Locale cache              web admin, plurals



      4.0.0             4.3.0       4.5.0              4.7.0




                2003 Sep
              extractor.php


                                            Disclaimer: time scale not exact
2006 Sep
     Translatable installer




                    5.0




2006 Aug                      2007 May
   @!                     Automated import


                                    Disclaimer: time scale not exact
2007 Jun
JS translation




       6.0                         7.0

                             2009 Aug
             2009 Jun   localize.drupal.org
             Contexts



                                   Disclaimer: time scale not exact
All lined up
TRANSLATING
THE BUILT-IN
 INTERFACE
TEXT COMES
    FROM
SOURCE CODE
t(‘Go to %page’,
array(‘%page’ => $p));


Drupal.t(‘Go to %page’,
       {‘%page’: num});
format_plural(
   $count,
   ‘1 year’, ‘@count years’
);

Drupal.formatPlural(
   count,
   ‘1 year’, ‘@count years’
);
D!"#$% 6 Ch!$for new versions at hojtsy.hu – Freely redistri
                                                                                                                                                     By Gábor Hojtsy –
                                                                                       ion API
                                                                   JavaScript translat                                        to the
                                                                                                      Translates ‘Home’                  play.
                 ion API                                                                e’) language used for page dis
Core PHP translat                           to the                        Drupal.t(‘Hom
                          Translates ‘Home’
               t(‘H ome’) requested language.
                                                                                       Plural Returns the prop              er translation for
                                                                       Drupal.format                                       l rules in
                                  Returns the proper                                  (count, the text based on plura
         format_plural




                                                                                                                                                                    & '(%$&)*'
                                                          sed                                                          e.
                                    lation for the text ba                     ‘1 comment’, the page’s langu
                                                                                                                    ag




                                                                                                                                                                      eck
                ($count, trans




                                                                                                                                                                                                                                                           GET THE
                               on plural rules  in the
                                                                        ‘@coun t comments’)
           ‘1 comment’,                        guage.
                           ’) requested lan                                                                      can be provided,
    ‘@count comm
                     ents                                                                       placements array
                                                                            Optional variable realways the page language!
                               placements array
                                                  and                             language is
           Optional variable re provided in this order.
                            n be                                                                             ix characters)
         language code ca                                                               ats (based on pref
                                                                        Replacement form                         value escaped with
                                         features                                          Replaced with the ut.
                    ns using translation
  Other PHP functio                                                             @count check_plain() for outp
             format_date Translates parts
                                                  of the




                                                                                                                                                                                                                                                       CHEAT SHEET


                                                                                                                                                                                             +,-$& (,--&bu. ble as long as credit is kept.
                                                                                                                                     d
                                                                                                                  value escaped an
            ($timesta    mp, date/time formatting.                                          Replaced with the             r (theme
               'medium', ...)                                                                       ted as a placeholde
                                                                                  %size format
                                                  interval in                                (‘placeh older’)).
                               Displays the time                                                                                       t
                             l                Translates                                                           value as is, withou
           format_interva human terms.                                                        Replaced with the ting. Insecure! Only
                         ... ) names of the segments.
          ($timestamp,                                                                                  ional format
                                                                                   !html any addit eady sanitized your text.
                                                    provided                                        use if you alr
                                Formats a file size e MB,                                                                       y(




                                                                                                                                                                                                                                                             FROM
                                     tes. Translate s th                                                         irectory’, arra
                     ize, ...) in by                                                             me moved to @d
      format_size($s                                                             Example: t(‘%na                     => $dirname);




                                                                                                                                                                                                                        ta
                                                     .
                                KB and byte labels                                             lename, ‘@dire
                                                                                                              ctory’




                                                                                                                                                                                                                          1.1 - '*.-/0
                                                                                ‘%name’ => $fi
                                                  e code at the end.
                               an optional languag
        All functions accept                                                                   th   e installer
                                                                           Translating text in
                                         ed later                                                                       y as t(), but
                      translation and us                                                          Works the same wa ckend. Use
      Text extracted for                                                                                              y ba
                                  Module/theme nam
                                                      e;                                          uses a file+memor
                        fo files description; package na
                                                          me.                         st(‘Home’ ) only in the installer and in install




                                                                                                                                                                                                                                                         HOJTSY.HU
                    .in
                                                                                                                      support.
                                                                                                  profiles. No plural
                                                      names,
                                   Literal permission         d
                 hook_per   m() when provided with standar                                                                ll files and any




                                                                                                                                                                                                                                        -! 15. 2007.
                              ns array syntax.                                                     Use get_t() in .insta
              implementatio                                                                                             could run in the
                                                                                                   other code which s ‘t’ or ‘st’
                                                                                     $t = get_t(); installer too. It retu nction to be
                                                             d                                                           rn
                                         Menu item ‘title’ an
                  hook_menu() ‘description’ keys
                                                  , when                              $t(‘H ome’); depending on the fu
                                                        ings.                                                              t.
               implem entations provided as literal str                                             used at the momen
                                                     sage,
                                  Log type and mes ral                                                                                        nslation, your
                                                                                                                          and need to use traif your module
                                  when pr  ovided as lite                                           have an .install file                 ler
                                                                                 Remember: if you easily end up running in the instal e get_t()!
                              u’, strings. Third parameter
               watchdog(‘men                                                     function calls could core module in an install profile. Us
                            calls specifies the replacements                             becomes a
             ‘Items saved’)                           pport.
                                   array. No plural su

                                                                                                                                      bal context,
                                                                                                                Usage of t() in a glo ST’, t(‘...’)). The




                                                                                                                                                                                                                                                           ALSO SEE
                               mistakes                                       e message eg. for
          The most common                                 Reuse of the sam                                      such as define(‘CON t initialized at
                              lues,  such as t($type).                     d drupal_set_mes
                                                                                               sage()                                 t ye
                                                                                                                locale system is no e is incorrect
           Using dynamic va                     s to call watchdog() an
                                 dynamic string                                  allows t(), the later                   e, so this usag
           Whenever you use make sure that all            calls. The former dis t possible.                     that tim
                                                                                                                                     nasty performance
                                  ,
           the above functions eady in the code                                 is no
                                                          requires t(), so this e API functions                  and also leads to
                                                                                                                                         it.
           possibl e values are alr                  I.    Always ca  ll the abov                                problems. Never do
                                l form using the AP                           indirection.
            elsewhere in litera er provided content.       directly, without
                                us
            Do not translate



                                                                                                                                                                                                                                                        D.O/NODE/322729
                                                                                                                                  so
                                     e using the API pr
                                                        operly                                             ule plugin support, rt a
                                ar                                                      s have coder mod                           po
            Tools to verify you                        Drupal 6.  x-2 or later version rted in reviews. Also feel free to ex .
                                                                             e API is repo                               ings appear
                                                        improper use of th ule/theme and check whether all str
                                       /project/potx                          od
                     http://drupal.org                  template for your m                                                  e t() or some
                                                                                                       en you forgot to us
                                                                               nn ot find mistakes wh localization client has a
                                                         The potx module ca late your output. The                           . If certain
                                                         ot her function to trans translate text displayed on the page e API.
                                               _clie nt convenient interface to                        , you forg ot to use th
                               rg/project/l10n                                  ing up for translation
               http://drupal.o                            strings are not show
TEXT IS FOUND
 AND REPLACED
RUNTIME, WHEN
     USED
Hungarian           Croatian


Go to %page    %page. oldalra ugrás       ...


   1 year             1 év
                                      Uhm, not so
                                        simple
@count years       @count év
TRANSLATIONS
   ARE STORED
IN THE DATABASE
DRUPAL PROCESS
  Running
source code
DRUPAL PROCESS
  Running
source code
                   Found text
                  stored in DB
DRUPAL PROCESS
  Running
source code
                   Found text
                  stored in DB


                 User interface
                to translate text,
                  stored in DB
DRUPAL PROCESS
   Running
 source code
                      Found text
                     stored in DB


Text replaced on    User interface
     output        to translate text,
                     stored in DB
Where’s the happy family?
TRANSLATIONS
  ARE SHARED
IN GETTEXT .PO
SHARING PROCESS
SHARING PROCESS
SHARING PROCESS
                     Static
                  source code
SHARING PROCESS
                     Static
                  source code


                   Gettext
                    .pot
SHARING PROCESS
                     Static
                  source code


                   Gettext
                    .pot
SHARING PROCESS
                     Static
                  source code


                   Gettext
                    .pot


                  Translated
                     .po
SHARING PROCESS
                     Static
                  source code


                   Gettext
                    .pot


                  Translated
                     .po
SHARING PROCESS
                     Static
                  source code


                   Gettext
                    .pot


                  Translated
                     .po
•Translation template       Static
 extractor               source code
•http://drupal.org/
 project/potx
•Web interface in your    Gettext
 Drupal install            .pot
•Interfaces with coder
 review module to help
 developers
SHARING PROCESS
                     Static
                  source code


                   Gettext
                    .pot


                  Translated
                     .po
SHARING PROCESS
                     Static
                  source code


                   Gettext
                    .pot


                  Translated
                     .po
Desktop tools like
PoEdit or just Notepad



                          Gettext
                           .pot


                         Translated
                            .po
SHARING PROCESS
                     Static
                  source code


                   Gettext
                    .pot


                  Translated
                     .po
SHARING PROCESS
                     Static
                  source code


                   Gettext
                    .pot


                  Translated
                     .po
•Translation teams commit .po files to CVS
•http://drupal.org/project/Translations
 and under contributed projects
•Released on the parent project’s
 timeframe
•Drupal imports automatically


                                  Translated
                                     .po
SHARING PROCESS
                     Static
                  source code


                   Gettext
                    .pot


                  Translated
                     .po
SHARING PROCESS
                     Static
                  source code


                   Gettext
                    .pot


                  Translated
                     .po
•Built-in translation interface
•http://drupal.org/project/l10n_client
•Import and export .po(t) files manually
SHARING PROCESS
                     Static
                  source code


                   Gettext
                    .pot


                  Translated
                     .po
SHARING PROCESS
                     Static
                  source code


                   Gettext
                    .pot


                  Translated
                     .po
All come together
GIVING AWAY
 (THIS WAY)
   IS HARD
POTX
POTX   .PO
CVS
 POTX   .PO
CVS
   POTX    .PO


RELEASES
CVS
   POTX       .PO


RELEASES
           BRANCHES
CVS        PLURAL FORMS
   POTX         .PO


RELEASES
           BRANCHES
CVS        PLURAL FORMS
   POTX         .PO
      SCHEDULING

RELEASES
           BRANCHES
CVS        PLURAL FORMS
    POTX          .PO
        SCHEDULING

RELEASES
               BRANCHES
ISSUE QUEUES
ENOUGH!
LOCALIZE.DRUPAL.ORG


Web UI for Drupal.org
 project translations
LOCALIZE.DRUPAL.ORG


Automated parsing of
Drupal.org releases on
    publication
LOCALIZE.DRUPAL.ORG


  Skips CVS, branching,
templates, hides potx and
  plural forms, does not
  require desktop tools
LOCALIZE.DRUPAL.ORG



 Single-sign-on with
     Drupal.org
LOCALIZE.DRUPAL.ORG



 Organic groups based
     translations
LOCALIZE.DRUPAL.ORG



Different permission levels
     (open/controlled)
LOCALIZE.DRUPAL.ORG


 Keeps import/export
 support with Gettext
       formats
LOCALIZE.DRUPAL.ORG


   Provides a remote
submission web service for
   Localization client
Oh, those stats!
almost                               over


5000                               5600
projects known                      releases parsed

                        over



    149000       strings to translate
149000
  IT IS LIKE
TRANSLATING
   DRUPAL
  43 TIMES
15
  TRANSLATION
TEAMS LAUNCHED
    IN BETA
(MORE IN QUEUE)
Take a ride!
Envious?
SOFTWARE ON L.D.O

• Translation
            template extractor
 http://drupal.org/project/potx

• Localization
             server:
 http://drupal.org/project/l10n_server

• Organicgroups
 http://drupal.org/project/og
TRANSLATE YOUR CODE

• Open Atrium and Gallery 2 uses
 Localization server to translate their
 code

• Youcan set up l10n_server to parse
 your own code and translate in-house

• Eg.   https://translate.openatrium.com/
Long way to go
Color the future!
THESE SLIDES ARE (CC)
                                          Photo credits:
                                 http://www.flickr.com/photos/sinkdd/2853334715/
                                 http://www.flickr.com/photos/chavals/2978360981/
                                 http://www.flickr.com/photos/koesbong/125933266/
                               http://www.flickr.com/photos/cheishichiyo/3637712921/
                                   http://www.flickr.com/photos/paky/52194393/
                               http://www.flickr.com/photos/patrickgage/3738107746/
                                 http://www.flickr.com/photos/zhzheka/1240470939/
                                 http://www.flickr.com/photos/fchouse/3270958643/
                                   http://www.flickr.com/photos/colinj/490622069/
                                  http://www.flickr.com/photos/brartist/313272029/




This presentation is © Gábor Hojtsy
Licensed: http://creativecommons.org/licenses/by-nc-sa/2.0/
THANK YOU!
 Gábor Hojtsy, Acquia
  gabor@hojtsy.hu
   http://hojtsy.hu/

More Related Content

Similar to Here comes localize.drupal.org!

Translate Drupal from Drupalcamp Prague
Translate Drupal from Drupalcamp PragueTranslate Drupal from Drupalcamp Prague
Translate Drupal from Drupalcamp PragueGábor Hojtsy
 
Model-Driven Software Development - Language Workbenches & Syntax Definition
Model-Driven Software Development - Language Workbenches & Syntax DefinitionModel-Driven Software Development - Language Workbenches & Syntax Definition
Model-Driven Software Development - Language Workbenches & Syntax DefinitionEelco Visser
 
Unsupervised analysis for decipherment problems
Unsupervised analysis for decipherment problemsUnsupervised analysis for decipherment problems
Unsupervised analysis for decipherment problemsAttaporn Ninsuwan
 
Sugar Presentation - YULHackers March 2009
Sugar Presentation - YULHackers March 2009Sugar Presentation - YULHackers March 2009
Sugar Presentation - YULHackers March 2009spierre
 
WordPress Plugin Localization
WordPress Plugin LocalizationWordPress Plugin Localization
WordPress Plugin LocalizationRonald Huereca
 
ApacheCon 2010 Keynote: Problems, Data, and Languages
ApacheCon 2010 Keynote: Problems, Data, and LanguagesApacheCon 2010 Keynote: Problems, Data, and Languages
ApacheCon 2010 Keynote: Problems, Data, and LanguagesRobert Sutor
 
Best training-in-mumbai-shell scripting
Best training-in-mumbai-shell scriptingBest training-in-mumbai-shell scripting
Best training-in-mumbai-shell scriptingvibrantuser
 
Getting started in c++
Getting started in c++Getting started in c++
Getting started in c++Neeru Mittal
 
Regular expressions
Regular expressionsRegular expressions
Regular expressionskeeyre
 
You Can Do It! Start Using Perl to Handle Your Voyager Needs
You Can Do It! Start Using Perl to Handle Your Voyager NeedsYou Can Do It! Start Using Perl to Handle Your Voyager Needs
You Can Do It! Start Using Perl to Handle Your Voyager NeedsRoy Zimmer
 

Similar to Here comes localize.drupal.org! (20)

Translate Drupal from Drupalcamp Prague
Translate Drupal from Drupalcamp PragueTranslate Drupal from Drupalcamp Prague
Translate Drupal from Drupalcamp Prague
 
Model-Driven Software Development - Language Workbenches & Syntax Definition
Model-Driven Software Development - Language Workbenches & Syntax DefinitionModel-Driven Software Development - Language Workbenches & Syntax Definition
Model-Driven Software Development - Language Workbenches & Syntax Definition
 
Nate tech deck
Nate tech deckNate tech deck
Nate tech deck
 
Unsupervised analysis for decipherment problems
Unsupervised analysis for decipherment problemsUnsupervised analysis for decipherment problems
Unsupervised analysis for decipherment problems
 
10 Jo P Oct 07
10 Jo P Oct 0710 Jo P Oct 07
10 Jo P Oct 07
 
Sugar Presentation - YULHackers March 2009
Sugar Presentation - YULHackers March 2009Sugar Presentation - YULHackers March 2009
Sugar Presentation - YULHackers March 2009
 
WordPress Plugin Localization
WordPress Plugin LocalizationWordPress Plugin Localization
WordPress Plugin Localization
 
Introduction to php basics
Introduction to php   basicsIntroduction to php   basics
Introduction to php basics
 
Materi Dasar PHP
Materi Dasar PHPMateri Dasar PHP
Materi Dasar PHP
 
Multilingual drupal 7
Multilingual drupal 7Multilingual drupal 7
Multilingual drupal 7
 
ApacheCon 2010 Keynote: Problems, Data, and Languages
ApacheCon 2010 Keynote: Problems, Data, and LanguagesApacheCon 2010 Keynote: Problems, Data, and Languages
ApacheCon 2010 Keynote: Problems, Data, and Languages
 
Php Vs Phyton
Php Vs PhytonPhp Vs Phyton
Php Vs Phyton
 
Best training-in-mumbai-shell scripting
Best training-in-mumbai-shell scriptingBest training-in-mumbai-shell scripting
Best training-in-mumbai-shell scripting
 
Getting started in c++
Getting started in c++Getting started in c++
Getting started in c++
 
Php
PhpPhp
Php
 
Dynamic Linker
Dynamic LinkerDynamic Linker
Dynamic Linker
 
Php Learning show
Php Learning showPhp Learning show
Php Learning show
 
Php1
Php1Php1
Php1
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
You Can Do It! Start Using Perl to Handle Your Voyager Needs
You Can Do It! Start Using Perl to Handle Your Voyager NeedsYou Can Do It! Start Using Perl to Handle Your Voyager Needs
You Can Do It! Start Using Perl to Handle Your Voyager Needs
 

More from Gábor Hojtsy

Open source project management at scale
 Open source project management at scale Open source project management at scale
Open source project management at scaleGábor Hojtsy
 
Drupal 8.3.0: the features are ready, are you?
Drupal 8.3.0: the features are ready, are you?Drupal 8.3.0: the features are ready, are you?
Drupal 8.3.0: the features are ready, are you?Gábor Hojtsy
 
Drupal 8 multilingual APIs
Drupal 8 multilingual APIsDrupal 8 multilingual APIs
Drupal 8 multilingual APIsGábor Hojtsy
 
A Drupal 8 jövője és az oda vezető út
A Drupal 8 jövője és az oda vezető útA Drupal 8 jövője és az oda vezető út
A Drupal 8 jövője és az oda vezető útGábor Hojtsy
 
Everything multilingual in Drupal 8
Everything multilingual in Drupal 8Everything multilingual in Drupal 8
Everything multilingual in Drupal 8Gábor Hojtsy
 
Everything multilingual in Drupal 8 (2015 November)
Everything multilingual in Drupal 8 (2015 November)Everything multilingual in Drupal 8 (2015 November)
Everything multilingual in Drupal 8 (2015 November)Gábor Hojtsy
 
All the language support in Drupal 8 - At Drupalaton 2014
All the language support in Drupal 8 - At Drupalaton 2014All the language support in Drupal 8 - At Drupalaton 2014
All the language support in Drupal 8 - At Drupalaton 2014Gábor Hojtsy
 
Drupal 8 Multilingual - what to look forward to
Drupal 8 Multilingual - what to look forward toDrupal 8 Multilingual - what to look forward to
Drupal 8 Multilingual - what to look forward toGábor Hojtsy
 
Doing Drupal security right from Drupalcon London
Doing Drupal security right from Drupalcon LondonDoing Drupal security right from Drupalcon London
Doing Drupal security right from Drupalcon LondonGábor Hojtsy
 
Doing Drupal security right
Doing Drupal security rightDoing Drupal security right
Doing Drupal security rightGábor Hojtsy
 
Drupal security - Configuration and process
Drupal security - Configuration and processDrupal security - Configuration and process
Drupal security - Configuration and processGábor Hojtsy
 
Come for the software, stay for the community
Come for the software, stay for the communityCome for the software, stay for the community
Come for the software, stay for the communityGábor Hojtsy
 
Come for the software, stay for the community - How Drupal improves and evolves
Come for the software, stay for the community - How Drupal improves and evolvesCome for the software, stay for the community - How Drupal improves and evolves
Come for the software, stay for the community - How Drupal improves and evolvesGábor Hojtsy
 
What's up with Drupal 7?
What's up with Drupal 7?What's up with Drupal 7?
What's up with Drupal 7?Gábor Hojtsy
 
Multilingual Drupal presentation from "Do it With Drupal"
Multilingual Drupal presentation from "Do it With Drupal"Multilingual Drupal presentation from "Do it With Drupal"
Multilingual Drupal presentation from "Do it With Drupal"Gábor Hojtsy
 

More from Gábor Hojtsy (16)

Open source project management at scale
 Open source project management at scale Open source project management at scale
Open source project management at scale
 
Drupal 8.3.0: the features are ready, are you?
Drupal 8.3.0: the features are ready, are you?Drupal 8.3.0: the features are ready, are you?
Drupal 8.3.0: the features are ready, are you?
 
Drupal 8 multilingual APIs
Drupal 8 multilingual APIsDrupal 8 multilingual APIs
Drupal 8 multilingual APIs
 
A Drupal 8 jövője és az oda vezető út
A Drupal 8 jövője és az oda vezető útA Drupal 8 jövője és az oda vezető út
A Drupal 8 jövője és az oda vezető út
 
Everything multilingual in Drupal 8
Everything multilingual in Drupal 8Everything multilingual in Drupal 8
Everything multilingual in Drupal 8
 
Everything multilingual in Drupal 8 (2015 November)
Everything multilingual in Drupal 8 (2015 November)Everything multilingual in Drupal 8 (2015 November)
Everything multilingual in Drupal 8 (2015 November)
 
All the language support in Drupal 8 - At Drupalaton 2014
All the language support in Drupal 8 - At Drupalaton 2014All the language support in Drupal 8 - At Drupalaton 2014
All the language support in Drupal 8 - At Drupalaton 2014
 
Drupal 8 Multilingual - what to look forward to
Drupal 8 Multilingual - what to look forward toDrupal 8 Multilingual - what to look forward to
Drupal 8 Multilingual - what to look forward to
 
Doing Drupal security right from Drupalcon London
Doing Drupal security right from Drupalcon LondonDoing Drupal security right from Drupalcon London
Doing Drupal security right from Drupalcon London
 
Multilingual Drupal
Multilingual DrupalMultilingual Drupal
Multilingual Drupal
 
Doing Drupal security right
Doing Drupal security rightDoing Drupal security right
Doing Drupal security right
 
Drupal security - Configuration and process
Drupal security - Configuration and processDrupal security - Configuration and process
Drupal security - Configuration and process
 
Come for the software, stay for the community
Come for the software, stay for the communityCome for the software, stay for the community
Come for the software, stay for the community
 
Come for the software, stay for the community - How Drupal improves and evolves
Come for the software, stay for the community - How Drupal improves and evolvesCome for the software, stay for the community - How Drupal improves and evolves
Come for the software, stay for the community - How Drupal improves and evolves
 
What's up with Drupal 7?
What's up with Drupal 7?What's up with Drupal 7?
What's up with Drupal 7?
 
Multilingual Drupal presentation from "Do it With Drupal"
Multilingual Drupal presentation from "Do it With Drupal"Multilingual Drupal presentation from "Do it With Drupal"
Multilingual Drupal presentation from "Do it With Drupal"
 

Recently uploaded

Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
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
 
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
 
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
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
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
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
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
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
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
 

Recently uploaded (20)

Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
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
 
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
 
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
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
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
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
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
 

Here comes localize.drupal.org!

  • 1. Here comes localize.drupal.org Gábor Hojtsy, Acquia, Drupalcon Paris
  • 2. ME • Needed a translated Drupal in 2003 • Became locale.module maintainer, Drupal 6 core committer • Developed all kinds of translation tools • Working for Acquia
  • 3. YOU • Running translated Drupal sites? • Translating modules for “self”? • Contributing to drupal.org translations? • Writing & translating modules to “self”?
  • 5. 2001 Jan 22 t() is born Drupal 1.0.0 2.0.0 3.0.0 2001 Feb locale.module, translation interface Drupal.org Disclaimer: time scale not exact
  • 6. 2004 Aug 2002 Jan Gettext based sharing, Locale cache web admin, plurals 4.0.0 4.3.0 4.5.0 4.7.0 2003 Sep extractor.php Disclaimer: time scale not exact
  • 7. 2006 Sep Translatable installer 5.0 2006 Aug 2007 May @! Automated import Disclaimer: time scale not exact
  • 8. 2007 Jun JS translation 6.0 7.0 2009 Aug 2009 Jun localize.drupal.org Contexts Disclaimer: time scale not exact
  • 11. TEXT COMES FROM SOURCE CODE
  • 12. t(‘Go to %page’, array(‘%page’ => $p)); Drupal.t(‘Go to %page’, {‘%page’: num});
  • 13. format_plural( $count, ‘1 year’, ‘@count years’ ); Drupal.formatPlural( count, ‘1 year’, ‘@count years’ );
  • 14. D!"#$% 6 Ch!$for new versions at hojtsy.hu – Freely redistri By Gábor Hojtsy – ion API JavaScript translat to the Translates ‘Home’ play. ion API e’) language used for page dis Core PHP translat to the Drupal.t(‘Hom Translates ‘Home’ t(‘H ome’) requested language. Plural Returns the prop er translation for Drupal.format l rules in Returns the proper (count, the text based on plura format_plural & '(%$&)*' sed e. lation for the text ba ‘1 comment’, the page’s langu ag eck ($count, trans GET THE on plural rules in the ‘@coun t comments’) ‘1 comment’, guage. ’) requested lan can be provided, ‘@count comm ents placements array Optional variable realways the page language! placements array and language is Optional variable re provided in this order. n be ix characters) language code ca ats (based on pref Replacement form value escaped with features Replaced with the ut. ns using translation Other PHP functio @count check_plain() for outp format_date Translates parts of the CHEAT SHEET +,-$& (,--&bu. ble as long as credit is kept. d value escaped an ($timesta mp, date/time formatting. Replaced with the r (theme 'medium', ...) ted as a placeholde %size format interval in (‘placeh older’)). Displays the time t l Translates value as is, withou format_interva human terms. Replaced with the ting. Insecure! Only ... ) names of the segments. ($timestamp, ional format !html any addit eady sanitized your text. provided use if you alr Formats a file size e MB, y( FROM tes. Translate s th irectory’, arra ize, ...) in by me moved to @d format_size($s Example: t(‘%na => $dirname); ta . KB and byte labels lename, ‘@dire ctory’ 1.1 - '*.-/0 ‘%name’ => $fi e code at the end. an optional languag All functions accept th e installer Translating text in ed later y as t(), but translation and us Works the same wa ckend. Use Text extracted for y ba Module/theme nam e; uses a file+memor fo files description; package na me. st(‘Home’ ) only in the installer and in install HOJTSY.HU .in support. profiles. No plural names, Literal permission d hook_per m() when provided with standar ll files and any -! 15. 2007. ns array syntax. Use get_t() in .insta implementatio could run in the other code which s ‘t’ or ‘st’ $t = get_t(); installer too. It retu nction to be d rn Menu item ‘title’ an hook_menu() ‘description’ keys , when $t(‘H ome’); depending on the fu ings. t. implem entations provided as literal str used at the momen sage, Log type and mes ral nslation, your and need to use traif your module when pr ovided as lite have an .install file ler Remember: if you easily end up running in the instal e get_t()! u’, strings. Third parameter watchdog(‘men function calls could core module in an install profile. Us calls specifies the replacements becomes a ‘Items saved’) pport. array. No plural su bal context, Usage of t() in a glo ST’, t(‘...’)). The ALSO SEE mistakes e message eg. for The most common Reuse of the sam such as define(‘CON t initialized at lues, such as t($type). d drupal_set_mes sage() t ye locale system is no e is incorrect Using dynamic va s to call watchdog() an dynamic string allows t(), the later e, so this usag Whenever you use make sure that all calls. The former dis t possible. that tim nasty performance , the above functions eady in the code is no requires t(), so this e API functions and also leads to it. possibl e values are alr I. Always ca ll the abov problems. Never do l form using the AP indirection. elsewhere in litera er provided content. directly, without us Do not translate D.O/NODE/322729 so e using the API pr operly ule plugin support, rt a ar s have coder mod po Tools to verify you Drupal 6. x-2 or later version rted in reviews. Also feel free to ex . e API is repo ings appear improper use of th ule/theme and check whether all str /project/potx od http://drupal.org template for your m e t() or some en you forgot to us nn ot find mistakes wh localization client has a The potx module ca late your output. The . If certain ot her function to trans translate text displayed on the page e API. _clie nt convenient interface to , you forg ot to use th rg/project/l10n ing up for translation http://drupal.o strings are not show
  • 15. TEXT IS FOUND AND REPLACED RUNTIME, WHEN USED
  • 16. Hungarian Croatian Go to %page %page. oldalra ugrás ... 1 year 1 év Uhm, not so simple @count years @count év
  • 17. TRANSLATIONS ARE STORED IN THE DATABASE
  • 18. DRUPAL PROCESS Running source code
  • 19. DRUPAL PROCESS Running source code Found text stored in DB
  • 20. DRUPAL PROCESS Running source code Found text stored in DB User interface to translate text, stored in DB
  • 21. DRUPAL PROCESS Running source code Found text stored in DB Text replaced on User interface output to translate text, stored in DB
  • 23. TRANSLATIONS ARE SHARED IN GETTEXT .PO
  • 26. SHARING PROCESS Static source code
  • 27. SHARING PROCESS Static source code Gettext .pot
  • 28. SHARING PROCESS Static source code Gettext .pot
  • 29. SHARING PROCESS Static source code Gettext .pot Translated .po
  • 30. SHARING PROCESS Static source code Gettext .pot Translated .po
  • 31. SHARING PROCESS Static source code Gettext .pot Translated .po
  • 32. •Translation template Static extractor source code •http://drupal.org/ project/potx •Web interface in your Gettext Drupal install .pot •Interfaces with coder review module to help developers
  • 33. SHARING PROCESS Static source code Gettext .pot Translated .po
  • 34. SHARING PROCESS Static source code Gettext .pot Translated .po
  • 35. Desktop tools like PoEdit or just Notepad Gettext .pot Translated .po
  • 36. SHARING PROCESS Static source code Gettext .pot Translated .po
  • 37. SHARING PROCESS Static source code Gettext .pot Translated .po
  • 38. •Translation teams commit .po files to CVS •http://drupal.org/project/Translations and under contributed projects •Released on the parent project’s timeframe •Drupal imports automatically Translated .po
  • 39. SHARING PROCESS Static source code Gettext .pot Translated .po
  • 40. SHARING PROCESS Static source code Gettext .pot Translated .po
  • 42. SHARING PROCESS Static source code Gettext .pot Translated .po
  • 43. SHARING PROCESS Static source code Gettext .pot Translated .po
  • 45. GIVING AWAY (THIS WAY) IS HARD
  • 46.
  • 47. POTX
  • 48. POTX .PO
  • 49. CVS POTX .PO
  • 50. CVS POTX .PO RELEASES
  • 51. CVS POTX .PO RELEASES BRANCHES
  • 52. CVS PLURAL FORMS POTX .PO RELEASES BRANCHES
  • 53. CVS PLURAL FORMS POTX .PO SCHEDULING RELEASES BRANCHES
  • 54. CVS PLURAL FORMS POTX .PO SCHEDULING RELEASES BRANCHES ISSUE QUEUES
  • 56. LOCALIZE.DRUPAL.ORG Web UI for Drupal.org project translations
  • 58. LOCALIZE.DRUPAL.ORG Skips CVS, branching, templates, hides potx and plural forms, does not require desktop tools
  • 62. LOCALIZE.DRUPAL.ORG Keeps import/export support with Gettext formats
  • 63. LOCALIZE.DRUPAL.ORG Provides a remote submission web service for Localization client
  • 65. almost over 5000 5600 projects known releases parsed over 149000 strings to translate
  • 66. 149000 IT IS LIKE TRANSLATING DRUPAL 43 TIMES
  • 67. 15 TRANSLATION TEAMS LAUNCHED IN BETA (MORE IN QUEUE)
  • 70. SOFTWARE ON L.D.O • Translation template extractor http://drupal.org/project/potx • Localization server: http://drupal.org/project/l10n_server • Organicgroups http://drupal.org/project/og
  • 71. TRANSLATE YOUR CODE • Open Atrium and Gallery 2 uses Localization server to translate their code • Youcan set up l10n_server to parse your own code and translate in-house • Eg. https://translate.openatrium.com/
  • 74. THESE SLIDES ARE (CC) Photo credits: http://www.flickr.com/photos/sinkdd/2853334715/ http://www.flickr.com/photos/chavals/2978360981/ http://www.flickr.com/photos/koesbong/125933266/ http://www.flickr.com/photos/cheishichiyo/3637712921/ http://www.flickr.com/photos/paky/52194393/ http://www.flickr.com/photos/patrickgage/3738107746/ http://www.flickr.com/photos/zhzheka/1240470939/ http://www.flickr.com/photos/fchouse/3270958643/ http://www.flickr.com/photos/colinj/490622069/ http://www.flickr.com/photos/brartist/313272029/ This presentation is © Gábor Hojtsy Licensed: http://creativecommons.org/licenses/by-nc-sa/2.0/
  • 75. THANK YOU! Gábor Hojtsy, Acquia gabor@hojtsy.hu http://hojtsy.hu/