SlideShare a Scribd company logo
1 of 100
hello
                                bonjour
                              guten tag
                                   Hola
                                    你好
                                   helló
                                     hej
“Getting WordPress to              hallo
                               γειά σου
 speak your language”               ciao
                                  sveiki
                                   halló
                                  cześć
                                     alo
                              안녕하세요
                                 привіт

                                    hallå


Rick Radko              WordCamp Montreal
r3df.com                 August 18th, 2012
A little bit about me

Rick Radko – R-Cubed Design Forge
   Software, web and app designer/developer.
   Creating web sites since 1996.
   Artistic and creative engineer.

   WordPress enthusiast.
         Co-organizer of: The Ottawa WordPress Group.
          http://wpottawa.org

Slides are posted at:
   http://www.slideshare.net/r3df
© 2012 Rick Radko, r3df.com                              1
About this talk

The objective of this talk is to provide a primer for the
concepts and resources needed to create WordPress
sites in any language(s).

To keep the talk non-technical for the user track (and to
shorten it) I‟ve referenced links for the technical aspects,
or moved them to the appendix rather than discussing
them in the talk.

If you have technical questions after this talk you can
contact me at: wpinfo@r3df.com.

© 2012 Rick Radko, r3df.com                                    2
Fair warning!

If you want to set-up a WordPress site in different
languages yourself, you will need:
   to do WordPress installs.

And depending on the configuration or complexity
of your site, you may need to:
   edit some configuration files.
   edit/create language files.
   edit/create theme files
*All
   of this is well documented on the codex and elsewhere (use
Google), and quite simple for basic sites.
© 2012 Rick Radko, r3df.com                                     3
WordPress.com note


If you are a http://wordpress.com user:
   You can easily set your blog to any one of over 50
    languages with simple options see:
        http://en.support.wordpress.com/language-settings/
   Except for the next section on translations, most of
    this talk does not apply to wordpress.com.

If you want to do more with languages than you
can on wordpress.com, then stick around…
© 2012 Rick Radko, r3df.com                                  4
Lets get started!

Translation:
   The act of converting one language to another.
   Tends to be the thing that concerns people the
    most when they consider a web site in another
    language.
   You will need to get phrases, strings, and words
    translated, but:
         That is relatively straight forward.
         You don‟t even need to be able speak the language
          to create a site in that language, although it makes
          it easier.
© 2012 Rick Radko, r3df.com                                      5
Getting translations

   Human translations
       a) Do it yourself (if you speak the languages)
       b) Hire a translator:
              Good/best results.
                   Aware of regional differences, customs and dialects.
              9-14 cents per word.


   Machine translations:
         Inconsistent results – some good, some bad.
         Better than it was a few years ago.
         Still not a good option for a business site.
© 2012 Rick Radko, r3df.com                                                6
Google Translate

You can translate entire sites by entering a URL in
Google Translate http://translate.google.ca.




© 2012 Rick Radko, r3df.com                           7
French to English: the good

 This looks promising.




© 2012 Rick Radko, r3df.com   8
French to English: the bad

 But if we start looking more carefully…




© 2012 Rick Radko, r3df.com                9
French to English: the ugly

 A bit further down the page
   The ideal speaker discuss a topic on WordPress really is
    passionate and for which he may present …




© 2012 Rick Radko, r3df.com                                    10
How about English to French?

More translation issues…




© 2012 Rick Radko, r3df.com    11
Translation summary


For professional results, use human translators:

                                “Under the weather”

                                    won‟t become:


                              “Beneath a turbulent sky”


© 2012 Rick Radko, r3df.com                               12
Creating a website in another language


To create a web site in another language:
   It is obvious to most people that we need to
    translate our content, posts, pages, menu items,
    captions, and other content, and even possibly
    comments, to the languages wanted on the
    website.
   What is not so obvious is that we need to translate
    WordPress.


© 2012 Rick Radko, r3df.com                           13
Translating WordPress


The rest of this talk will be about translating or
localizing WordPress.
   In the first half we‟ll look at:
         Concepts, terms and issues with localization.
         Creating a single language site.
   In the second half we will look at:
         Creating multilingual sites.



© 2012 Rick Radko, r3df.com                               14
Internationalization: The first step in localization

Internationalization
   Is the process of designing software
    applications so that they can be adapted to
    various languages and regions without
    programming changes.
   WordPress uses the GNU gettext libraries and
    tools for internationalization.
   Programmers use gettext to produce a file with a
    list of words and strings that need translation.

For more info see:
http://codex.wordpress.org/I18n_for_WordPress_Developers
© 2012 Rick Radko, r3df.com                                15
Localization

Localization
   Is the process where translators adapt
    internationalized software to another language
    and culture by adding locale specific components
    and translating the text.
   Localization does not require any changes to the
    application code. (programmers are not needed)



For more info see:
http://codex.wordpress.org/Translating_WordPress
© 2012 Rick Radko, r3df.com                            16
Locale

A locale is a combination of language and regional
dialect.
   Locales usually correspond to countries.
   They are represented by codes.
         Examples of locale codes:
              fr-_CA would be for French and Canada.
              en_ CA would be for English and Canada.



For more info see:
http://www.gnu.org/software/gettext/manual/html_chapter/gettext_16.html#Language-Codes
http://www.gnu.org/software/gettext/manual/html_chapter/gettext_16.html#Country-Codes
© 2012 Rick Radko, r3df.com                                                              17
Locale and WordPress

WordPress, the themes, plugins and widgets
need to know what language to use to display
the site.
   That is determined by the locale set in the
    wp-config.php file.
   It‟s a bit of PHP code and looks like:

               define ('WPLANG', „fr_FR');
   If it‟s not set, or the matching language files don‟t
    exist, English will be used.

© 2012 Rick Radko, r3df.com                                 18
Some key items affected by localization

Date formats:
   Is it 05/29/2012 or 29/05/2012?
   May 29th, 2012 <-> Le 29 mai 2012


Time display:
   Is it 4:30pm or 16:30?

Number formats:
   Is it 1.987,06 or 1,987.06?

© 2012 Rick Radko, r3df.com               19
More: why localize WordPress?

Separators, curly quotes, apostrophes and
dashes:
   All can have regional differences.


Localizing sets the HTML language code for the
site:
   Tells the browser, search engines and other
    readers the language that your content is
    written in.


© 2012 Rick Radko, r3df.com                       20
73 localizations ready and waiting


Fortunately most of us won‟t need to do the work
of localizing WordPress:

   Currently there are 73 translations of WordPress
    available.


So how do you get these other languages?


© 2012 Rick Radko, r3df.com                            21
Start with “WordPress in your language”

Start with the
codex page:
   WordPress in
    Your Language
   This page
    documents
    the current
    translations
    for WordPress.


                              http://codex.wordpress.org/WordPress_in_Your_Language
© 2012 Rick Radko, r3df.com                                                           22
Find the language you want

This is the French entry:




Note: fr_FR is the locale for French from France.
  There is no Canadian version.
© 2012 Rick Radko, r3df.com                         23
Official site for the French WordPress

Offers some general information and a download
for the French version of WordPress.




                              http://fr.wordpress.org/
© 2012 Rick Radko, r3df.com                              24
WordPress Francophone (the 4th link)

Has more French WordPress support, including
forums (the 5th link).




                              http://www.wordpress-fr.net/
© 2012 Rick Radko, r3df.com                                  25
Installable versions vs language files


The majority of the languages listed on WordPress
in Your Language have complete installable
versions of WordPress.

There are many however that have only the
language files needed to convert the default
version of WordPress to a new language.



© 2012 Rick Radko, r3df.com                     26
Installable localizations


The installable versions of WordPress are:
   Easy to install.
         Use the same “5 minute” install as the default
          WordPress.
   Great for single language sites.
         Could use as starting point for multilingual sites.
   Often include translated sample content. (Hello
    world post, sample page, menus etc.)


© 2012 Rick Radko, r3df.com                                     27
Language file only localizations


Language file only localizations:
   Do not have sample content.
   Are a bit more technical to install.




*See: “Creating your own translations” in the appendix for more
information on language files.
© 2012 Rick Radko, r3df.com                                       28
Installing the French version

Get the install file from http://fr.wordpress.org/.

It‟s a full install file, so install as you would for a
regular manual install of WordPress:
   See:
        http://codex.wordpress.org/Installing_WordPress
   Cannot use installers like SimpleScripts or
    Fantastico, on most North American hosting
    companies they will have the English version.


© 2012 Rick Radko, r3df.com                               29
A fresh French WordPress install

The front page with
the usual “Hello
World” post.

The Twenty Eleven
theme is the
default.




© 2012 Rick Radko, r3df.com        30
French WordPress install – example page

The example page.

Everything on the site
looks pretty much
like the regular
WordPress install
except it‟s all French.




© 2012 Rick Radko, r3df.com               31
Le Tableau de bord




© 2012 Rick Radko, r3df.com   32
Wait, the dashboard is in French too?


I want a French site, but I don‟t want a French
dashboard because:
   I don‟t know French that well.
   Some of the contributors are not fluent in French.
   My web person doesn‟t know French.


Fortunately, there‟s a plugin for that!


© 2012 Rick Radko, r3df.com                              33
Dashboard language plugins

Dashboard language plugins:
   Allow you to select a language for the dashboard
    separate from the site.
   Some have per user settings.
   Some have options for the front-end tool bar.
   Some have language selectors for the login
    screen.

*Dashboard    language plugins fool WordPress by overriding the
locale for the dashboard.
**The language files need to be installed for each language you

want to use in the dashboard.
© 2012 Rick Radko, r3df.com                                       34
Dashboard language plugin examples


Some dashboard language plugins: (there are
more)
         WP Native Dashboard
          http://wordpress.org/extend/plugins/wp-native-
          dashboard/
         Backend Localization
          http://wordpress.org/extend/plugins/kau-boys-
          backend-localization/



© 2012 Rick Radko, r3df.com                                35
What about adding plugins and themes?

An added plugin or theme shows some English
text:
   On the front-end.
         It needs to be localized.
   In the dashboard.
         Does it matter?




© 2012 Rick Radko, r3df.com                   36
Plugins & themes for other languages

To use plugins or themes with WordPress in
another language:
   They need to be internationalized.
         If they are not, look elsewhere, it typically requires a
          lot of code change to internationalize any sizable
          plugin or theme. (You also then have a maintenance
          nightmare)
   Localization is great, but not required.
         That means that there is no language file for the
          language you need.
         If it is internationalized, you can localize it,
          sometimes more easily than you would think.
© 2012 Rick Radko, r3df.com                                      37
Checking for internationalization

Check the plugin or theme description for:
   Any mention of language support.
   Any mention of translations, or translation credits.
   Any mention of localizable.
   Lists of languages.

If you find any of these, then it is at least
internationalized.
   You still may need to create a localization for your
    language though.
© 2012 Rick Radko, r3df.com                                38
Themes have some tags to help too


Some themes on the wordpress.org repository
have been tagged with:
   translation-ready
   rtl-language-support


If a theme is tagged, then it is internationalized.




© 2012 Rick Radko, r3df.com                           39
Internationalization not obvious?




There are more things you can do/look for to
check for internationalization, but you need to
open up and look at the plugin/theme files.




See “Internationalization, digging deeper” in the appendix.
© 2012 Rick Radko, r3df.com                                   40
Creating your own translations

If there is no language file in your language for:
   WordPress or
   a theme or
   a plugin
you can create your own.

If you use a lot of plugins it is likely you will need
to localize some.
   Once you have the tools, it‟s not very hard.

See: “Creating your own translations” in the appendix..
© 2012 Rick Radko, r3df.com                               41
Plugin example: Tweet Blender in French




© 2012 Rick Radko, r3df.com               42
Tweet Blender in French

The Tweet Blender translation was created by:
    Making a copy of the default translation file (.pot).
     (renamed of course)
    Entering translations for 21 of 206 strings in the
     file. (All that show on the front-end of the site.)
          Mostly times and duration, hour(s), day(s).
          18 of the translations were 1 word each.

The dashboard options are still in English.
*NOTE:  you can‟t change the actual tweet text.
**”Original language” note is from another plugin I developed.

© 2012 Rick Radko, r3df.com                                      43
Creating a Canadian French localization


As we have already noted:
   There is no official Canadian French version.
   There are differences from France French.
         For example 'email„ or 'e-mail' used in France, is
          'courriel‟ in Quebec.

To create a Canadian French version, start with
the France French files and modify as needed.


© 2012 Rick Radko, r3df.com                                    44
Installing WordPress language files manually

Sometimes you will need to install language files
manually:
   If you want a multilingual site.
   To convert an existing install to a new language.
   Your language does not have a complete install
    file available.
   You have created your own language files.



*Formore on installing language see “Installing WordPress
language files” in the appendix.
© 2012 Rick Radko, r3df.com                                 45
Tricks for installing language files

Trick #1
   Change the WPLANG parameter in the
    wp-config.php file to the locale you want.
         remember until you load the file, the site will default
          to English.
   Go to the Updates page in the dashboard and hit
    the “Re-load Now” button for the language.
         This trick may not work if you have a Dashboard
          Language Plugin active.
   Only works for languages on the wordpress.org
    repository.
© 2012 Rick Radko, r3df.com                                     46
Load German with trick #1




   This trick does not load WordPress theme files.
   Sample content is not changed. (Hello World)
© 2012 Rick Radko, r3df.com                           47
More tricks for language files

Trick #2
   Use WP Native Dashboard:
         It‟s an option in the settings.
         It only loads .mo files.
   To get the .po files if you need them, switch the
    dashboard to that language, do an update as in
    trick #1.
   This trick also: does not get theme files or the
    sample content, and only works for .org files.
*The file types .po and .mo are defined in “Creating your own
translations” in the appendix.
© 2012 Rick Radko, r3df.com                                     48
One more trick for language files

Plugin: Codestyling Localization
http://wordpress.org/extend/plugins/codestyling-
localization/

With this plugin:
       “You can manage and edit all gettext translation files
       (*.po/*.mo) directly out of the WordPress Admin
       Center without any need of an external editor.”



© 2012 Rick Radko, r3df.com                                     49
Multilingual web sites


A multilingual web site is a web site that has more
than one language on the same site, or related
group of sites.

A bilingual web site is a 2 language multilingual
web site.

   The WordCamp Montreal site is bilingual or
    multilingual.
© 2012 Rick Radko, r3df.com                         50
An obvious multilingual example

WordCamp Montreal…




                                       http://fr.2012.montreal.wordcamp.org/

  http://2012.montreal.wordcamp.org/
© 2012 Rick Radko, r3df.com                                                    51
Unilingual web site definition


A unilingual web site is a web site that has only
language shown on it.

   The WordPress France site is a French only web
    site and is unilingual French, not multilingual.




© 2012 Rick Radko, r3df.com                            52
WordPress is not multilingual




       “WordPress does not support a bilingual or
       multilingual blog out-of-the-box.”




                              http://codex.wordpress.org/Multilingual_WordPress

© 2012 Rick Radko, r3df.com                                                  53
WordPress is unilingual


When you install a localized version of WordPress:
   The site language is that language only.
         You do get English as a default due to the way
          WordPress is constructed.
   Even if you install more than one language, the
    site will still be unilingual in the locale set in the
    wp-config.php file.
         We need to do more to get a multilingual site.


© 2012 Rick Radko, r3df.com                                  54
Multilingual WordPress approaches


The rest of the talk will be about setting up
multilingual sites with WordPress.

To make a multilingual site you need:
   All the skills we just learned for creating a
    unilingual site.
   To add a few tricks to make it multilingual.



© 2012 Rick Radko, r3df.com                         55
Multilingual general notes

   No matter which approach you use, you will still
    have to deal with plugins and themes on a case by
    case basis.
         Some plugins that are internationalized do not work
          well in some multilingual set-ups.

   No approach will get you around entering content
    multiple times: once for each language.

   Right now there is no one best approach, each has
    it benefits and issues.
© 2012 Rick Radko, r3df.com                                 56
Translation structure

Translation structure may dictate the approach
taken.

Multilingual site content can be:
   Symmetric or mirrored.
         All content is in all languages
              Each item is linked to the other languages.
         Governments, and institutions.



© 2012 Rick Radko, r3df.com                                  57
Translation structure continued

   Partially symmetric.
         Most content in all languages.
              Blogs – may be left in original language.
                   Reduces translation costs
         Comments – may be left in submitted language.
              Typically not practical to translate them.
                   Costs would be high.
                   Hard to be timely.


   Un-connected.
         Sites have a link to other languages, but not on an
          content item by item basis.
© 2012 Rick Radko, r3df.com                                     58
Multilingual with multiple sites




Conceptually, the simplest implementation of
multilingual is:
   2 or more completely independent installs of
    WordPress, one for each language.




© 2012 Rick Radko, r3df.com                        59
Issues with multiple sites

Multiple individual installs is not recommended
as:
   The maintenance is high, need to update each site
    individually. (repeat everything for each site)
   Hard to link matching pages between languages.
         One plugin: Bilingual Linker (only for bilingual sites)
   No dashboard connection:
         Content management is more difficult.
         Multiple logins.


© 2012 Rick Radko, r3df.com                                     60
Reasonable WordPress multilingual set-ups.


3 main approaches
   Single site
         Using custom theme/tricks
         Using multilingual plugins
   Multisite




© 2012 Rick Radko, r3df.com                  61
Single site multilingual


A single site multilingual install needs to manage
all the different language versions of:
   the content
   the menus
   the output from themes, widgets and plugins
and co-ordinate them so that they provide the
same language for every requested page.


© 2012 Rick Radko, r3df.com                          62
Single site using custom theme/tricks

Single site installs can made multilingual through
the use of clever custom themes that use:
   page templates or
   custom metadata or
   post categories
   other tricks
to define the language of the page and set the
matching menus, theme text items and
corresponding sidebars.

© 2012 Rick Radko, r3df.com                          63
Single site with tricks issues

There may be issues with plugin/widget output:
   Locales may not be set properly for each language
    with this technique.

This technique:
   Requires extensive theme coding.
         Some content may be hard-coded in the theme.
   Requires that content contributors mark content
    with tags, meta data or templates.
   Does not support symmetric linking well.
   Works best for small sites with static content.
© 2012 Rick Radko, r3df.com                              64
Single site with plugins

There are a quite a few plugins that manage
multilingual WordPress single site installs.
   qTranslate
   WPML (not on the repository, it‟s not free)
         Built-in translation system
         A lot of assistive tools for translating themes and
          plugins.
   xili-language
   + some more


© 2012 Rick Radko, r3df.com                                     65
Single site with plugins issues

Plugin issues:
   Lock-in is the #1 issue
         Once you start using one of these plugins it is hard
          to change to something else.
         Can be an issue at update time, plugin updates can
          lag WordPress, and plugins sometimes die.
              qTranslate is barely being maintained right now and
               has had some bug issues over the last year with some
               WordPress updates.
         Most sites built with these plugins will not run, or
          will only display 1 default language if the plugin is
          disabled or removed.
© 2012 Rick Radko, r3df.com                                       66
Single site with plugins issues

   Can be complex to manage the install.
         Hacks and workarounds are often needed for
          themes and plugins/widgets to use them with the
          multilingual plugins.
         Complex plugins with their own data storage, like
          events managers, calendars may not work.
         Widget management is an issue.
              There is no built-in way of displaying different widgets
               on “different language” sites (as far as WordPress is
               concerned it‟s one site). Need a widget manager like:
               http://wordpress.org/extend/plugins/widget-logic/

© 2012 Rick Radko, r3df.com                                               67
Single site with plugins issues


   Having differences in the theme, or different
    themes for each language is a challenge.
         It is still really one site.
   URL‟s are not always translated
         Extra plugin is needed for qTranslate
   Bugs & stability (not future proof)




© 2012 Rick Radko, r3df.com                         68
Single site with plugins benefits

With a single site with plugins:
   Only one WordPress install to manage/update
         Only one theme to manage.
   It‟s easy to manage content.
         Single dashboard and login.
         Easy to link content between languages
   Some plugins manage adding language files.
   Some plugins help with creating translations of
    other plugins and themes.
   WPML offers integration to a translation service.
© 2012 Rick Radko, r3df.com                             69
Multilingual with multisite

Historically single site with plugins has been the
most popular technique, but:
   Since WordPress 3.0 we have had multisite
    (network) in the standard version of WordPress.
   Multisite allows you to have what appear to be
    multiple different WordPress sites running on one
    install of WordPress.
         Different themes.
         Different URL‟s (if you want)
         You would not know it‟s one WordPress.

© 2012 Rick Radko, r3df.com                             70
Multilingual with multisite continued


Using multisite allows:
   A “single” site approach.
   But removes many of the negative issues with
    independent single site installs.




© 2012 Rick Radko, r3df.com                        71
Installing multisite

To enable multisite, you need to perform a short
sequence of steps, which include:
   Dashboard setting changes.
   Cutting and pasting some provided settings into
    configuration files.


There are many guides to walk you through the
process:
   http://codex.wordpress.org/Create_A_Network
   http://halfelf.org/ebooks/wordpress-multisite-101/
© 2012 Rick Radko, r3df.com                              72
Adding languages to multisite

You can start your multisite install with any version
of WordPress.
   If you use a localized version that will give you one
    language plus English.
         The sample content is in the localized language.

To add more languages you need to:
   Install the language files manually.
   Use the Codestyling Localization plugin.

*See       “Installing WordPress language files” in the appendix.
© 2012 Rick Radko, r3df.com                                         73
Setting multisite languages

   Once you have language files installed:
      An option for site language will appear in the
       Settings -> General section.
            It‟s also in the network admin site settings.




© 2012 Rick Radko, r3df.com                                  74
Multilingual with multisite issues

   More complicated to install multisite WordPress
         Not as simple as the regular 5-min install.
         But is not hard either – maybe 10 minutes
   Some plugins don‟t run on multisite.
   Some duplication of effort to manage sites.
         Plugins may need to be configured on each site.
   Plugins that store their own data may have
    separate datasets on each site. This could be an
    issue for something like registration systems.


© 2012 Rick Radko, r3df.com                                 75
More multisite issues


   Separate dashboards for each language site.
         But there usually is only one login.
         Not quite as easy to manage content.
    No language connection between content items.
         This can be resolved with Language Switcher
          Plugins for multisite.




© 2012 Rick Radko, r3df.com                             76
Language switcher plugins

These plugins help relate content items between
the sites and provide widgets for front-end links
between different language versions of content.

Language switcher plugins:
   Multisite Language Switcher
   Multilingual Press
   More?



© 2012 Rick Radko, r3df.com                         77
Multilingual with multisite benefits


   Reduced dependency on the plugins.
         If you remove or disable a plugin used to manage
          language switching, all the sites still work, you just
          loose the linking between them.
   Each site behaves as if it is a single site:
         You don‟t need a plugin to manage the front-end
          site display.
              Fewer plugin conflicts.
         Sites run normally, no tricks.


© 2012 Rick Radko, r3df.com                                        78
Multilingual considerations


   Splash page for language choice
   Multilingual home page (allows language choice)
   Browser or location sniffing – Don‟t!
   Merged comments on symmetric content?
         Merged is default with qTranslate,
         Need plugins for other approaches.
   Google (SEO) -> don't mix languages.
         Best practice -> one language per page.


© 2012 Rick Radko, r3df.com                           79
Multilingual considerations


Domains/url‟s (example pairs for bilingual French)
   Single installs site only
         yourdomain.com?lang=en
         yourdomain.com?lang=fr




© 2012 Rick Radko, r3df.com                      80
Multilingual considerations

   Any install type:
         yourdomain.com or yourdomain.ca
         yourdomain.fr

         yourdomain.com/en
         yourdomain.com/fr

         en.yourdomain.com
         fr.yourdomain.com



© 2012 Rick Radko, r3df.com                 81
Contact


Rick Radko
   email: wpinfo@r3df.com
   twitter: @r3designforge


Slides at:
   www.slideshare.net/r3df




© 2012 Rick Radko, r3df.com   82
Appendix




© 2012 Rick Radko, r3df.com   83
Links

WordPress in Your Language
   http://codex.wordpress.org/WordPress_in_Your_Lang
    uage
Installing WordPress in Your Language
   http://codex.wordpress.org/Installing_WordPress_in_
    Your_Language
Multilingual WordPress
   http://codex.wordpress.org/Multilingual_WordPress
Translating WordPress
   http://codex.wordpress.org/Translating_WordPress

© 2012 Rick Radko, r3df.com                               84
Links


Glotpress
   http://translate.wordpress.org/getting-started
   http://blog.glotpress.org/
   http://translate.wordpress.org/projects




© 2012 Rick Radko, r3df.com                          85
Internationalization digging deeper




© 2012 Rick Radko, r3df.com           86
Checking the files for internationalization

   Look in the plugin or theme folder for folders
    called:
         Languages
         Language
         Lang
         i18n
   Check for .pot, .mo and .po files.

   If any these files exist, then you can create a
    translation.

© 2012 Rick Radko, r3df.com                           87
Internationalization still not obvious? Go deeper

If you are really desperate for a plugin or theme in
a language and there is no indication that it is
internationalized:
   You can check the code for things like:
         __(<some text>, some domain)
         _e(<some text>, some domain)
   If they exist, you may be able to localize it.
         You will need to create you own .pot file
   This may require a lot of effort
For more info see:
http://codex.wordpress.org/I18n_for_WordPress_Developers
© 2012 Rick Radko, r3df.com                                88
What are __() and _e()?

__() and _e() are the magic in the WordPress code
that lets localization work.

Example: __(„Hello‟, „twentyeleven‟)
   Means look for “Hello” in the language files for the
    Twenty Eleven theme, for current locale, say fr_FR.
    That would then return “Bonjour” if the files are
    loaded, and “Hello” if they are not.

For more info see:
http://codex.wordpress.org/I18n_for_WordPress_Developers
© 2012 Rick Radko, r3df.com                                89
Creating your own translations




© 2012 Rick Radko, r3df.com      90
You need .pot, .mo. or .po files to start

.POT (Portable Object Template) files are created
by the developer they have all text in the __() or
_e() functions.

.PO (Portable Object) files are plain text files that
list all the translation pairs.
                #: wp-admin/includes/upgrade.php:213
                msgid "Hello world!“
                msgstr "Bonjour tout le monde&nbsp;!“

.MO (Machine Object) files are compiled versions
of the .po files.
© 2012 Rick Radko, r3df.com                             91
You need .pot, .mo. or .po files to start


If you can‟t find a .pot, .mo, or .po file for the
plugin or theme you want to translate:
   Don’t try to translate it!
   Try another theme, or plugin.


WordPress .pot files, and other .mo, and .po files
that you can use as starting points are of course
available.

© 2012 Rick Radko, r3df.com                          92
Change existing .mo. or .po files

You can often start with an existing .mo or .po file
and just change what you need.
   If there is something close:
         Canadian vs France French
   If you only need to change a few items
         Tweet Blender



See: http://codex.wordpress.org/I18n_for_WordPress_Developers
for a lot of important details like naming conventions for your files.

© 2012 Rick Radko, r3df.com                                              93
Editing translation files

2 editors I use are:
   Poedit - the most commonly mentioned
    http://www.poedit.net/
         available for Windows, Mac and Linux
   Virtaal
    http://translate.sourceforge.net/wiki/virtaal/index
         Has translation help
         Lets you add terms
         available for Windows, Mac and Linux
*For a complete list of tools see:
http://codex.wordpress.org/Translating_WordPress#Translation_To
ols
© 2012 Rick Radko, r3df.com                                  94
Poedit




© 2012 Rick Radko, r3df.com   95
Adding your language files to plugins & themes

To install new language files for plugins & themes,
add them to the language folder you found when
checking out the plugin or theme.
Folders called:
         Languages
         Language
         Lang
         i18n
*Use the same naming convention for your files as the theme or
plugin.
**Use your hosts cPanel or FTP functions.
© 2012 Rick Radko, r3df.com                                      96
Installing WordPress language files




© 2012 Rick Radko, r3df.com           97
Find the language files

Find the needed language files on:
   http://codex.wordpress.org/WordPress_in_Your_L
    anguage OR
   http://i18n.svn.wordpress.org/


If the only version on “WordPress in Your
Language” is an installer version, it may be easier
to get them out of the .zip file than to find them on
http://i18n.svn.wordpress.org/.

© 2012 Rick Radko, r3df.com                         98
Add the files to your WordPress install


For WordPress to find your language files, they
need to be put in the folder at:
   <your-site-root>/wp-content/languages/


The official instructions:
   http://codex.wordpress.org/Installing_WordPress_
    in_Your_Language



© 2012 Rick Radko, r3df.com                        99

More Related Content

What's hot

Introduction to WordPress for Beginners
Introduction to WordPress for BeginnersIntroduction to WordPress for Beginners
Introduction to WordPress for BeginnersR-Cubed Design Forge
 
WordPress page builders - a new tool to build awesome pages quickly
WordPress page builders - a new tool to build awesome pages quicklyWordPress page builders - a new tool to build awesome pages quickly
WordPress page builders - a new tool to build awesome pages quicklyR-Cubed Design Forge
 
Setting up a local web server environment
Setting up a local web server environmentSetting up a local web server environment
Setting up a local web server environmentR-Cubed Design Forge
 
Gutenberg 101/Blocks - How to get along with, and even like WordPress's block...
Gutenberg 101/Blocks - How to get along with, and even like WordPress's block...Gutenberg 101/Blocks - How to get along with, and even like WordPress's block...
Gutenberg 101/Blocks - How to get along with, and even like WordPress's block...R-Cubed Design Forge
 
Gutenberg: Revolutionizing your WordPress site
Gutenberg: Revolutionizing your WordPress siteGutenberg: Revolutionizing your WordPress site
Gutenberg: Revolutionizing your WordPress siteR-Cubed Design Forge
 
Gutenberg - The future of WordPress
Gutenberg - The future of WordPressGutenberg - The future of WordPress
Gutenberg - The future of WordPressR-Cubed Design Forge
 
One language to rule them all type script
One language to rule them all type scriptOne language to rule them all type script
One language to rule them all type scriptGil Fink
 
Going Global with WordPress Multilingual (WordCamp Denpasar 2016)
Going Global with WordPress Multilingual (WordCamp Denpasar 2016)Going Global with WordPress Multilingual (WordCamp Denpasar 2016)
Going Global with WordPress Multilingual (WordCamp Denpasar 2016)Dat Hoang
 
Freelancer Weapons of mass productivity
Freelancer Weapons of mass productivityFreelancer Weapons of mass productivity
Freelancer Weapons of mass productivityGregg Coppen
 
Quick & Dirty Wordpress Customization
Quick & Dirty Wordpress CustomizationQuick & Dirty Wordpress Customization
Quick & Dirty Wordpress CustomizationMagnetic Ideas, LLC
 
Bootstrapping your plugin
Bootstrapping your pluginBootstrapping your plugin
Bootstrapping your pluginMarko Heijnen
 
Last Month in PHP - February 2016
Last Month in PHP - February 2016Last Month in PHP - February 2016
Last Month in PHP - February 2016Eric Poe
 
WordPress Internationalization, Localization and Multilingual - Do It Right
WordPress Internationalization, Localization and Multilingual - Do It RightWordPress Internationalization, Localization and Multilingual - Do It Right
WordPress Internationalization, Localization and Multilingual - Do It RightDat Hoang
 
Ppt full stack developer
Ppt full stack developerPpt full stack developer
Ppt full stack developerSudhirVarpe1
 
What is the Responsibility of Plugin Developers?
What is the Responsibility of Plugin Developers?What is the Responsibility of Plugin Developers?
What is the Responsibility of Plugin Developers?Takayuki Miyoshi
 
PHP: Hypertext Preprocessor Introduction
PHP: Hypertext Preprocessor IntroductionPHP: Hypertext Preprocessor Introduction
PHP: Hypertext Preprocessor IntroductionOto Brglez
 

What's hot (18)

Introduction to WordPress for Beginners
Introduction to WordPress for BeginnersIntroduction to WordPress for Beginners
Introduction to WordPress for Beginners
 
WordPress page builders - a new tool to build awesome pages quickly
WordPress page builders - a new tool to build awesome pages quicklyWordPress page builders - a new tool to build awesome pages quickly
WordPress page builders - a new tool to build awesome pages quickly
 
Setting up a local web server environment
Setting up a local web server environmentSetting up a local web server environment
Setting up a local web server environment
 
Gutenberg 101/Blocks - How to get along with, and even like WordPress's block...
Gutenberg 101/Blocks - How to get along with, and even like WordPress's block...Gutenberg 101/Blocks - How to get along with, and even like WordPress's block...
Gutenberg 101/Blocks - How to get along with, and even like WordPress's block...
 
Gutenberg: Revolutionizing your WordPress site
Gutenberg: Revolutionizing your WordPress siteGutenberg: Revolutionizing your WordPress site
Gutenberg: Revolutionizing your WordPress site
 
Gutenberg - The future of WordPress
Gutenberg - The future of WordPressGutenberg - The future of WordPress
Gutenberg - The future of WordPress
 
Multisite for multilingual
Multisite for multilingualMultisite for multilingual
Multisite for multilingual
 
One language to rule them all type script
One language to rule them all type scriptOne language to rule them all type script
One language to rule them all type script
 
Going Global with WordPress Multilingual (WordCamp Denpasar 2016)
Going Global with WordPress Multilingual (WordCamp Denpasar 2016)Going Global with WordPress Multilingual (WordCamp Denpasar 2016)
Going Global with WordPress Multilingual (WordCamp Denpasar 2016)
 
Freelancer Weapons of mass productivity
Freelancer Weapons of mass productivityFreelancer Weapons of mass productivity
Freelancer Weapons of mass productivity
 
Quick & Dirty Wordpress Customization
Quick & Dirty Wordpress CustomizationQuick & Dirty Wordpress Customization
Quick & Dirty Wordpress Customization
 
Bootstrapping your plugin
Bootstrapping your pluginBootstrapping your plugin
Bootstrapping your plugin
 
Last Month in PHP - February 2016
Last Month in PHP - February 2016Last Month in PHP - February 2016
Last Month in PHP - February 2016
 
WordPress Internationalization, Localization and Multilingual - Do It Right
WordPress Internationalization, Localization and Multilingual - Do It RightWordPress Internationalization, Localization and Multilingual - Do It Right
WordPress Internationalization, Localization and Multilingual - Do It Right
 
Ppt full stack developer
Ppt full stack developerPpt full stack developer
Ppt full stack developer
 
WP-ShowHide
WP-ShowHideWP-ShowHide
WP-ShowHide
 
What is the Responsibility of Plugin Developers?
What is the Responsibility of Plugin Developers?What is the Responsibility of Plugin Developers?
What is the Responsibility of Plugin Developers?
 
PHP: Hypertext Preprocessor Introduction
PHP: Hypertext Preprocessor IntroductionPHP: Hypertext Preprocessor Introduction
PHP: Hypertext Preprocessor Introduction
 

Viewers also liked

Vietas piesaiste un mobilitāte: brīva izvēle vai nepieciešamība?
Vietas piesaiste un mobilitāte: brīva izvēle vai nepieciešamība?Vietas piesaiste un mobilitāte: brīva izvēle vai nepieciešamība?
Vietas piesaiste un mobilitāte: brīva izvēle vai nepieciešamība?nacionalaidentitate
 
แสงกระจาย
แสงกระจายแสงกระจาย
แสงกระจายSegsun Supawong
 
Cognitive surplus
Cognitive surplusCognitive surplus
Cognitive surplusdbermingham
 
Marco simoncelli
Marco simoncelliMarco simoncelli
Marco simoncelliGineNC
 
Presentation2
Presentation2Presentation2
Presentation2sllarrull
 
Job performance not a predictor of engagement (Leadership IQ whitepaper)
Job performance not a predictor of engagement (Leadership IQ whitepaper)Job performance not a predictor of engagement (Leadership IQ whitepaper)
Job performance not a predictor of engagement (Leadership IQ whitepaper)Benjamin Crucq
 
Predmet izucavanja
Predmet izucavanjaPredmet izucavanja
Predmet izucavanjaJelenaBg
 
IPad HD Games
IPad HD GamesIPad HD Games
IPad HD GamesMihex
 
Turkey Protests
Turkey ProtestsTurkey Protests
Turkey ProtestsMihex
 
Philosophy for old age Korean
Philosophy for old age KoreanPhilosophy for old age Korean
Philosophy for old age Koreantbae2000
 
473 tactical cellular jamming system
473 tactical cellular jamming system473 tactical cellular jamming system
473 tactical cellular jamming systemriskis
 
Международная конференция "Корпоративное волонтерство: 3D"
Международная конференция "Корпоративное волонтерство: 3D"Международная конференция "Корпоративное волонтерство: 3D"
Международная конференция "Корпоративное волонтерство: 3D"ufb
 
«Река долголетия»
«Река долголетия»«Река долголетия»
«Река долголетия»35nw
 
Cilvēks un vieta: nacionālās identitātes un rīcībspējas telpiskie aspekti
Cilvēks un vieta: nacionālās identitātes un rīcībspējas telpiskie aspektiCilvēks un vieta: nacionālās identitātes un rīcībspējas telpiskie aspekti
Cilvēks un vieta: nacionālās identitātes un rīcībspējas telpiskie aspektinacionalaidentitate
 
Remembering Pat Kelley
Remembering Pat KelleyRemembering Pat Kelley
Remembering Pat KelleyRichard Kelley
 
Fight of the Century
Fight of the CenturyFight of the Century
Fight of the CenturyMihex
 
Real Life Hobbit House
Real Life Hobbit HouseReal Life Hobbit House
Real Life Hobbit HouseMihex
 

Viewers also liked (20)

Vietas piesaiste un mobilitāte: brīva izvēle vai nepieciešamība?
Vietas piesaiste un mobilitāte: brīva izvēle vai nepieciešamība?Vietas piesaiste un mobilitāte: brīva izvēle vai nepieciešamība?
Vietas piesaiste un mobilitāte: brīva izvēle vai nepieciešamība?
 
แสงกระจาย
แสงกระจายแสงกระจาย
แสงกระจาย
 
Cognitive surplus
Cognitive surplusCognitive surplus
Cognitive surplus
 
Intro2 research
Intro2 researchIntro2 research
Intro2 research
 
Marco simoncelli
Marco simoncelliMarco simoncelli
Marco simoncelli
 
Presentation2
Presentation2Presentation2
Presentation2
 
Job performance not a predictor of engagement (Leadership IQ whitepaper)
Job performance not a predictor of engagement (Leadership IQ whitepaper)Job performance not a predictor of engagement (Leadership IQ whitepaper)
Job performance not a predictor of engagement (Leadership IQ whitepaper)
 
Predmet izucavanja
Predmet izucavanjaPredmet izucavanja
Predmet izucavanja
 
IPad HD Games
IPad HD GamesIPad HD Games
IPad HD Games
 
Turkey Protests
Turkey ProtestsTurkey Protests
Turkey Protests
 
Philosophy for old age Korean
Philosophy for old age KoreanPhilosophy for old age Korean
Philosophy for old age Korean
 
473 tactical cellular jamming system
473 tactical cellular jamming system473 tactical cellular jamming system
473 tactical cellular jamming system
 
Международная конференция "Корпоративное волонтерство: 3D"
Международная конференция "Корпоративное волонтерство: 3D"Международная конференция "Корпоративное волонтерство: 3D"
Международная конференция "Корпоративное волонтерство: 3D"
 
Payment add
Payment addPayment add
Payment add
 
Workbook sesion6
Workbook sesion6Workbook sesion6
Workbook sesion6
 
«Река долголетия»
«Река долголетия»«Река долголетия»
«Река долголетия»
 
Cilvēks un vieta: nacionālās identitātes un rīcībspējas telpiskie aspekti
Cilvēks un vieta: nacionālās identitātes un rīcībspējas telpiskie aspektiCilvēks un vieta: nacionālās identitātes un rīcībspējas telpiskie aspekti
Cilvēks un vieta: nacionālās identitātes un rīcībspējas telpiskie aspekti
 
Remembering Pat Kelley
Remembering Pat KelleyRemembering Pat Kelley
Remembering Pat Kelley
 
Fight of the Century
Fight of the CenturyFight of the Century
Fight of the Century
 
Real Life Hobbit House
Real Life Hobbit HouseReal Life Hobbit House
Real Life Hobbit House
 

Similar to Getting WordPress to speak your langauge

How to WordPress: the basics, part 1
How to WordPress:  the basics, part 1How to WordPress:  the basics, part 1
How to WordPress: the basics, part 1R-Cubed Design Forge
 
Barcelona Multilanguage
Barcelona MultilanguageBarcelona Multilanguage
Barcelona Multilanguageguest3a6661
 
Open Source examples from Adobe : Oscon kiosk
Open Source examples from Adobe : Oscon kioskOpen Source examples from Adobe : Oscon kiosk
Open Source examples from Adobe : Oscon kioskDave McAllister
 
Code is Poetry: The WordPress OpenSource Project
Code is Poetry: The WordPress OpenSource ProjectCode is Poetry: The WordPress OpenSource Project
Code is Poetry: The WordPress OpenSource ProjectMichele Butcher-Jones
 
Do WordPress developers write code?
Do WordPress developers write code?Do WordPress developers write code?
Do WordPress developers write code?Stanko Metodiev
 
simple basic wordpress ppt .pptx
simple basic wordpress ppt .pptxsimple basic wordpress ppt .pptx
simple basic wordpress ppt .pptxDeepikaAdhikari7
 
NodeJS vs Golang - A detailed comparison
NodeJS vs Golang - A detailed comparisonNodeJS vs Golang - A detailed comparison
NodeJS vs Golang - A detailed comparisonDevathon
 
Multilingual WordPress
Multilingual WordPressMultilingual WordPress
Multilingual WordPressMatt Smith
 
Multilingual WordPress (WordCamp Toronto 2014)
Multilingual WordPress (WordCamp Toronto 2014)Multilingual WordPress (WordCamp Toronto 2014)
Multilingual WordPress (WordCamp Toronto 2014)Matt Smith
 
Backing up your WordPress website – it’s not optional
Backing up your WordPress website – it’s not optionalBacking up your WordPress website – it’s not optional
Backing up your WordPress website – it’s not optionalR-Cubed Design Forge
 
Dockerized ROS Package
Dockerized ROS PackageDockerized ROS Package
Dockerized ROS PackageParham Nikdouz
 
DrupalCon Paris Muiltilingual Panel
DrupalCon Paris Muiltilingual PanelDrupalCon Paris Muiltilingual Panel
DrupalCon Paris Muiltilingual PanelDoug Green
 
wcdk - Making your WordPress Multilingual
wcdk - Making your WordPress Multilingualwcdk - Making your WordPress Multilingual
wcdk - Making your WordPress MultilingualAmit Kvint
 
Lavacon12 rethink content paper to tablet
Lavacon12 rethink content paper to tabletLavacon12 rethink content paper to tablet
Lavacon12 rethink content paper to tabletMaxwell Hoffmann
 
React Native? A developer's perspective
React Native? A developer's perspectiveReact Native? A developer's perspective
React Native? A developer's perspectiveBorisConforty
 

Similar to Getting WordPress to speak your langauge (20)

How to WordPress: the basics, part 1
How to WordPress:  the basics, part 1How to WordPress:  the basics, part 1
How to WordPress: the basics, part 1
 
Barcelona Multilanguage
Barcelona MultilanguageBarcelona Multilanguage
Barcelona Multilanguage
 
Introduction to WordPress
Introduction to WordPressIntroduction to WordPress
Introduction to WordPress
 
Open Source examples from Adobe : Oscon kiosk
Open Source examples from Adobe : Oscon kioskOpen Source examples from Adobe : Oscon kiosk
Open Source examples from Adobe : Oscon kiosk
 
Code is Poetry: The WordPress OpenSource Project
Code is Poetry: The WordPress OpenSource ProjectCode is Poetry: The WordPress OpenSource Project
Code is Poetry: The WordPress OpenSource Project
 
Do WordPress developers write code?
Do WordPress developers write code?Do WordPress developers write code?
Do WordPress developers write code?
 
simple basic wordpress ppt .pptx
simple basic wordpress ppt .pptxsimple basic wordpress ppt .pptx
simple basic wordpress ppt .pptx
 
NodeJS vs Golang - A detailed comparison
NodeJS vs Golang - A detailed comparisonNodeJS vs Golang - A detailed comparison
NodeJS vs Golang - A detailed comparison
 
Multilingual WordPress
Multilingual WordPressMultilingual WordPress
Multilingual WordPress
 
Multilingual WordPress (WordCamp Toronto 2014)
Multilingual WordPress (WordCamp Toronto 2014)Multilingual WordPress (WordCamp Toronto 2014)
Multilingual WordPress (WordCamp Toronto 2014)
 
Backing up your WordPress website – it’s not optional
Backing up your WordPress website – it’s not optionalBacking up your WordPress website – it’s not optional
Backing up your WordPress website – it’s not optional
 
Progamming Path.pptx
Progamming Path.pptxProgamming Path.pptx
Progamming Path.pptx
 
Backups, Backups, Backups
Backups, Backups, BackupsBackups, Backups, Backups
Backups, Backups, Backups
 
Dockerized ROS Package
Dockerized ROS PackageDockerized ROS Package
Dockerized ROS Package
 
Go Revel Gooo...
Go Revel Gooo...Go Revel Gooo...
Go Revel Gooo...
 
DrupalCon Paris Muiltilingual Panel
DrupalCon Paris Muiltilingual PanelDrupalCon Paris Muiltilingual Panel
DrupalCon Paris Muiltilingual Panel
 
wcdk - Making your WordPress Multilingual
wcdk - Making your WordPress Multilingualwcdk - Making your WordPress Multilingual
wcdk - Making your WordPress Multilingual
 
Lavacon12 rethink content paper to tablet
Lavacon12 rethink content paper to tabletLavacon12 rethink content paper to tablet
Lavacon12 rethink content paper to tablet
 
Apache cordova
Apache cordovaApache cordova
Apache cordova
 
React Native? A developer's perspective
React Native? A developer's perspectiveReact Native? A developer's perspective
React Native? A developer's perspective
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 

Recently uploaded (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 

Getting WordPress to speak your langauge

  • 1. hello bonjour guten tag Hola 你好 helló hej “Getting WordPress to hallo γειά σου speak your language” ciao sveiki halló cześć alo 안녕하세요 привіт hallå Rick Radko WordCamp Montreal r3df.com August 18th, 2012
  • 2. A little bit about me Rick Radko – R-Cubed Design Forge  Software, web and app designer/developer.  Creating web sites since 1996.  Artistic and creative engineer.  WordPress enthusiast.  Co-organizer of: The Ottawa WordPress Group. http://wpottawa.org Slides are posted at:  http://www.slideshare.net/r3df © 2012 Rick Radko, r3df.com 1
  • 3. About this talk The objective of this talk is to provide a primer for the concepts and resources needed to create WordPress sites in any language(s). To keep the talk non-technical for the user track (and to shorten it) I‟ve referenced links for the technical aspects, or moved them to the appendix rather than discussing them in the talk. If you have technical questions after this talk you can contact me at: wpinfo@r3df.com. © 2012 Rick Radko, r3df.com 2
  • 4. Fair warning! If you want to set-up a WordPress site in different languages yourself, you will need:  to do WordPress installs. And depending on the configuration or complexity of your site, you may need to:  edit some configuration files.  edit/create language files.  edit/create theme files *All of this is well documented on the codex and elsewhere (use Google), and quite simple for basic sites. © 2012 Rick Radko, r3df.com 3
  • 5. WordPress.com note If you are a http://wordpress.com user:  You can easily set your blog to any one of over 50 languages with simple options see: http://en.support.wordpress.com/language-settings/  Except for the next section on translations, most of this talk does not apply to wordpress.com. If you want to do more with languages than you can on wordpress.com, then stick around… © 2012 Rick Radko, r3df.com 4
  • 6. Lets get started! Translation:  The act of converting one language to another.  Tends to be the thing that concerns people the most when they consider a web site in another language.  You will need to get phrases, strings, and words translated, but:  That is relatively straight forward.  You don‟t even need to be able speak the language to create a site in that language, although it makes it easier. © 2012 Rick Radko, r3df.com 5
  • 7. Getting translations  Human translations a) Do it yourself (if you speak the languages) b) Hire a translator:  Good/best results.  Aware of regional differences, customs and dialects.  9-14 cents per word.  Machine translations:  Inconsistent results – some good, some bad.  Better than it was a few years ago.  Still not a good option for a business site. © 2012 Rick Radko, r3df.com 6
  • 8. Google Translate You can translate entire sites by entering a URL in Google Translate http://translate.google.ca. © 2012 Rick Radko, r3df.com 7
  • 9. French to English: the good This looks promising. © 2012 Rick Radko, r3df.com 8
  • 10. French to English: the bad But if we start looking more carefully… © 2012 Rick Radko, r3df.com 9
  • 11. French to English: the ugly A bit further down the page  The ideal speaker discuss a topic on WordPress really is passionate and for which he may present … © 2012 Rick Radko, r3df.com 10
  • 12. How about English to French? More translation issues… © 2012 Rick Radko, r3df.com 11
  • 13. Translation summary For professional results, use human translators: “Under the weather” won‟t become: “Beneath a turbulent sky” © 2012 Rick Radko, r3df.com 12
  • 14. Creating a website in another language To create a web site in another language:  It is obvious to most people that we need to translate our content, posts, pages, menu items, captions, and other content, and even possibly comments, to the languages wanted on the website.  What is not so obvious is that we need to translate WordPress. © 2012 Rick Radko, r3df.com 13
  • 15. Translating WordPress The rest of this talk will be about translating or localizing WordPress.  In the first half we‟ll look at:  Concepts, terms and issues with localization.  Creating a single language site.  In the second half we will look at:  Creating multilingual sites. © 2012 Rick Radko, r3df.com 14
  • 16. Internationalization: The first step in localization Internationalization  Is the process of designing software applications so that they can be adapted to various languages and regions without programming changes.  WordPress uses the GNU gettext libraries and tools for internationalization.  Programmers use gettext to produce a file with a list of words and strings that need translation. For more info see: http://codex.wordpress.org/I18n_for_WordPress_Developers © 2012 Rick Radko, r3df.com 15
  • 17. Localization Localization  Is the process where translators adapt internationalized software to another language and culture by adding locale specific components and translating the text.  Localization does not require any changes to the application code. (programmers are not needed) For more info see: http://codex.wordpress.org/Translating_WordPress © 2012 Rick Radko, r3df.com 16
  • 18. Locale A locale is a combination of language and regional dialect.  Locales usually correspond to countries.  They are represented by codes.  Examples of locale codes:  fr-_CA would be for French and Canada.  en_ CA would be for English and Canada. For more info see: http://www.gnu.org/software/gettext/manual/html_chapter/gettext_16.html#Language-Codes http://www.gnu.org/software/gettext/manual/html_chapter/gettext_16.html#Country-Codes © 2012 Rick Radko, r3df.com 17
  • 19. Locale and WordPress WordPress, the themes, plugins and widgets need to know what language to use to display the site.  That is determined by the locale set in the wp-config.php file.  It‟s a bit of PHP code and looks like: define ('WPLANG', „fr_FR');  If it‟s not set, or the matching language files don‟t exist, English will be used. © 2012 Rick Radko, r3df.com 18
  • 20. Some key items affected by localization Date formats:  Is it 05/29/2012 or 29/05/2012?  May 29th, 2012 <-> Le 29 mai 2012 Time display:  Is it 4:30pm or 16:30? Number formats:  Is it 1.987,06 or 1,987.06? © 2012 Rick Radko, r3df.com 19
  • 21. More: why localize WordPress? Separators, curly quotes, apostrophes and dashes:  All can have regional differences. Localizing sets the HTML language code for the site:  Tells the browser, search engines and other readers the language that your content is written in. © 2012 Rick Radko, r3df.com 20
  • 22. 73 localizations ready and waiting Fortunately most of us won‟t need to do the work of localizing WordPress:  Currently there are 73 translations of WordPress available. So how do you get these other languages? © 2012 Rick Radko, r3df.com 21
  • 23. Start with “WordPress in your language” Start with the codex page:  WordPress in Your Language  This page documents the current translations for WordPress. http://codex.wordpress.org/WordPress_in_Your_Language © 2012 Rick Radko, r3df.com 22
  • 24. Find the language you want This is the French entry: Note: fr_FR is the locale for French from France.  There is no Canadian version. © 2012 Rick Radko, r3df.com 23
  • 25. Official site for the French WordPress Offers some general information and a download for the French version of WordPress. http://fr.wordpress.org/ © 2012 Rick Radko, r3df.com 24
  • 26. WordPress Francophone (the 4th link) Has more French WordPress support, including forums (the 5th link). http://www.wordpress-fr.net/ © 2012 Rick Radko, r3df.com 25
  • 27. Installable versions vs language files The majority of the languages listed on WordPress in Your Language have complete installable versions of WordPress. There are many however that have only the language files needed to convert the default version of WordPress to a new language. © 2012 Rick Radko, r3df.com 26
  • 28. Installable localizations The installable versions of WordPress are:  Easy to install.  Use the same “5 minute” install as the default WordPress.  Great for single language sites.  Could use as starting point for multilingual sites.  Often include translated sample content. (Hello world post, sample page, menus etc.) © 2012 Rick Radko, r3df.com 27
  • 29. Language file only localizations Language file only localizations:  Do not have sample content.  Are a bit more technical to install. *See: “Creating your own translations” in the appendix for more information on language files. © 2012 Rick Radko, r3df.com 28
  • 30. Installing the French version Get the install file from http://fr.wordpress.org/. It‟s a full install file, so install as you would for a regular manual install of WordPress:  See: http://codex.wordpress.org/Installing_WordPress  Cannot use installers like SimpleScripts or Fantastico, on most North American hosting companies they will have the English version. © 2012 Rick Radko, r3df.com 29
  • 31. A fresh French WordPress install The front page with the usual “Hello World” post. The Twenty Eleven theme is the default. © 2012 Rick Radko, r3df.com 30
  • 32. French WordPress install – example page The example page. Everything on the site looks pretty much like the regular WordPress install except it‟s all French. © 2012 Rick Radko, r3df.com 31
  • 33. Le Tableau de bord © 2012 Rick Radko, r3df.com 32
  • 34. Wait, the dashboard is in French too? I want a French site, but I don‟t want a French dashboard because:  I don‟t know French that well.  Some of the contributors are not fluent in French.  My web person doesn‟t know French. Fortunately, there‟s a plugin for that! © 2012 Rick Radko, r3df.com 33
  • 35. Dashboard language plugins Dashboard language plugins:  Allow you to select a language for the dashboard separate from the site.  Some have per user settings.  Some have options for the front-end tool bar.  Some have language selectors for the login screen. *Dashboard language plugins fool WordPress by overriding the locale for the dashboard. **The language files need to be installed for each language you want to use in the dashboard. © 2012 Rick Radko, r3df.com 34
  • 36. Dashboard language plugin examples Some dashboard language plugins: (there are more)  WP Native Dashboard http://wordpress.org/extend/plugins/wp-native- dashboard/  Backend Localization http://wordpress.org/extend/plugins/kau-boys- backend-localization/ © 2012 Rick Radko, r3df.com 35
  • 37. What about adding plugins and themes? An added plugin or theme shows some English text:  On the front-end.  It needs to be localized.  In the dashboard.  Does it matter? © 2012 Rick Radko, r3df.com 36
  • 38. Plugins & themes for other languages To use plugins or themes with WordPress in another language:  They need to be internationalized.  If they are not, look elsewhere, it typically requires a lot of code change to internationalize any sizable plugin or theme. (You also then have a maintenance nightmare)  Localization is great, but not required.  That means that there is no language file for the language you need.  If it is internationalized, you can localize it, sometimes more easily than you would think. © 2012 Rick Radko, r3df.com 37
  • 39. Checking for internationalization Check the plugin or theme description for:  Any mention of language support.  Any mention of translations, or translation credits.  Any mention of localizable.  Lists of languages. If you find any of these, then it is at least internationalized.  You still may need to create a localization for your language though. © 2012 Rick Radko, r3df.com 38
  • 40. Themes have some tags to help too Some themes on the wordpress.org repository have been tagged with:  translation-ready  rtl-language-support If a theme is tagged, then it is internationalized. © 2012 Rick Radko, r3df.com 39
  • 41. Internationalization not obvious? There are more things you can do/look for to check for internationalization, but you need to open up and look at the plugin/theme files. See “Internationalization, digging deeper” in the appendix. © 2012 Rick Radko, r3df.com 40
  • 42. Creating your own translations If there is no language file in your language for:  WordPress or  a theme or  a plugin you can create your own. If you use a lot of plugins it is likely you will need to localize some.  Once you have the tools, it‟s not very hard. See: “Creating your own translations” in the appendix.. © 2012 Rick Radko, r3df.com 41
  • 43. Plugin example: Tweet Blender in French © 2012 Rick Radko, r3df.com 42
  • 44. Tweet Blender in French The Tweet Blender translation was created by:  Making a copy of the default translation file (.pot). (renamed of course)  Entering translations for 21 of 206 strings in the file. (All that show on the front-end of the site.)  Mostly times and duration, hour(s), day(s).  18 of the translations were 1 word each. The dashboard options are still in English. *NOTE: you can‟t change the actual tweet text. **”Original language” note is from another plugin I developed. © 2012 Rick Radko, r3df.com 43
  • 45. Creating a Canadian French localization As we have already noted:  There is no official Canadian French version.  There are differences from France French.  For example 'email„ or 'e-mail' used in France, is 'courriel‟ in Quebec. To create a Canadian French version, start with the France French files and modify as needed. © 2012 Rick Radko, r3df.com 44
  • 46. Installing WordPress language files manually Sometimes you will need to install language files manually:  If you want a multilingual site.  To convert an existing install to a new language.  Your language does not have a complete install file available.  You have created your own language files. *Formore on installing language see “Installing WordPress language files” in the appendix. © 2012 Rick Radko, r3df.com 45
  • 47. Tricks for installing language files Trick #1  Change the WPLANG parameter in the wp-config.php file to the locale you want.  remember until you load the file, the site will default to English.  Go to the Updates page in the dashboard and hit the “Re-load Now” button for the language.  This trick may not work if you have a Dashboard Language Plugin active.  Only works for languages on the wordpress.org repository. © 2012 Rick Radko, r3df.com 46
  • 48. Load German with trick #1  This trick does not load WordPress theme files.  Sample content is not changed. (Hello World) © 2012 Rick Radko, r3df.com 47
  • 49. More tricks for language files Trick #2  Use WP Native Dashboard:  It‟s an option in the settings.  It only loads .mo files.  To get the .po files if you need them, switch the dashboard to that language, do an update as in trick #1.  This trick also: does not get theme files or the sample content, and only works for .org files. *The file types .po and .mo are defined in “Creating your own translations” in the appendix. © 2012 Rick Radko, r3df.com 48
  • 50. One more trick for language files Plugin: Codestyling Localization http://wordpress.org/extend/plugins/codestyling- localization/ With this plugin: “You can manage and edit all gettext translation files (*.po/*.mo) directly out of the WordPress Admin Center without any need of an external editor.” © 2012 Rick Radko, r3df.com 49
  • 51. Multilingual web sites A multilingual web site is a web site that has more than one language on the same site, or related group of sites. A bilingual web site is a 2 language multilingual web site.  The WordCamp Montreal site is bilingual or multilingual. © 2012 Rick Radko, r3df.com 50
  • 52. An obvious multilingual example WordCamp Montreal… http://fr.2012.montreal.wordcamp.org/ http://2012.montreal.wordcamp.org/ © 2012 Rick Radko, r3df.com 51
  • 53. Unilingual web site definition A unilingual web site is a web site that has only language shown on it.  The WordPress France site is a French only web site and is unilingual French, not multilingual. © 2012 Rick Radko, r3df.com 52
  • 54. WordPress is not multilingual “WordPress does not support a bilingual or multilingual blog out-of-the-box.” http://codex.wordpress.org/Multilingual_WordPress © 2012 Rick Radko, r3df.com 53
  • 55. WordPress is unilingual When you install a localized version of WordPress:  The site language is that language only.  You do get English as a default due to the way WordPress is constructed.  Even if you install more than one language, the site will still be unilingual in the locale set in the wp-config.php file.  We need to do more to get a multilingual site. © 2012 Rick Radko, r3df.com 54
  • 56. Multilingual WordPress approaches The rest of the talk will be about setting up multilingual sites with WordPress. To make a multilingual site you need:  All the skills we just learned for creating a unilingual site.  To add a few tricks to make it multilingual. © 2012 Rick Radko, r3df.com 55
  • 57. Multilingual general notes  No matter which approach you use, you will still have to deal with plugins and themes on a case by case basis.  Some plugins that are internationalized do not work well in some multilingual set-ups.  No approach will get you around entering content multiple times: once for each language.  Right now there is no one best approach, each has it benefits and issues. © 2012 Rick Radko, r3df.com 56
  • 58. Translation structure Translation structure may dictate the approach taken. Multilingual site content can be:  Symmetric or mirrored.  All content is in all languages  Each item is linked to the other languages.  Governments, and institutions. © 2012 Rick Radko, r3df.com 57
  • 59. Translation structure continued  Partially symmetric.  Most content in all languages.  Blogs – may be left in original language.  Reduces translation costs  Comments – may be left in submitted language.  Typically not practical to translate them.  Costs would be high.  Hard to be timely.  Un-connected.  Sites have a link to other languages, but not on an content item by item basis. © 2012 Rick Radko, r3df.com 58
  • 60. Multilingual with multiple sites Conceptually, the simplest implementation of multilingual is:  2 or more completely independent installs of WordPress, one for each language. © 2012 Rick Radko, r3df.com 59
  • 61. Issues with multiple sites Multiple individual installs is not recommended as:  The maintenance is high, need to update each site individually. (repeat everything for each site)  Hard to link matching pages between languages.  One plugin: Bilingual Linker (only for bilingual sites)  No dashboard connection:  Content management is more difficult.  Multiple logins. © 2012 Rick Radko, r3df.com 60
  • 62. Reasonable WordPress multilingual set-ups. 3 main approaches  Single site  Using custom theme/tricks  Using multilingual plugins  Multisite © 2012 Rick Radko, r3df.com 61
  • 63. Single site multilingual A single site multilingual install needs to manage all the different language versions of:  the content  the menus  the output from themes, widgets and plugins and co-ordinate them so that they provide the same language for every requested page. © 2012 Rick Radko, r3df.com 62
  • 64. Single site using custom theme/tricks Single site installs can made multilingual through the use of clever custom themes that use:  page templates or  custom metadata or  post categories  other tricks to define the language of the page and set the matching menus, theme text items and corresponding sidebars. © 2012 Rick Radko, r3df.com 63
  • 65. Single site with tricks issues There may be issues with plugin/widget output:  Locales may not be set properly for each language with this technique. This technique:  Requires extensive theme coding.  Some content may be hard-coded in the theme.  Requires that content contributors mark content with tags, meta data or templates.  Does not support symmetric linking well.  Works best for small sites with static content. © 2012 Rick Radko, r3df.com 64
  • 66. Single site with plugins There are a quite a few plugins that manage multilingual WordPress single site installs.  qTranslate  WPML (not on the repository, it‟s not free)  Built-in translation system  A lot of assistive tools for translating themes and plugins.  xili-language  + some more © 2012 Rick Radko, r3df.com 65
  • 67. Single site with plugins issues Plugin issues:  Lock-in is the #1 issue  Once you start using one of these plugins it is hard to change to something else.  Can be an issue at update time, plugin updates can lag WordPress, and plugins sometimes die.  qTranslate is barely being maintained right now and has had some bug issues over the last year with some WordPress updates.  Most sites built with these plugins will not run, or will only display 1 default language if the plugin is disabled or removed. © 2012 Rick Radko, r3df.com 66
  • 68. Single site with plugins issues  Can be complex to manage the install.  Hacks and workarounds are often needed for themes and plugins/widgets to use them with the multilingual plugins.  Complex plugins with their own data storage, like events managers, calendars may not work.  Widget management is an issue.  There is no built-in way of displaying different widgets on “different language” sites (as far as WordPress is concerned it‟s one site). Need a widget manager like: http://wordpress.org/extend/plugins/widget-logic/ © 2012 Rick Radko, r3df.com 67
  • 69. Single site with plugins issues  Having differences in the theme, or different themes for each language is a challenge.  It is still really one site.  URL‟s are not always translated  Extra plugin is needed for qTranslate  Bugs & stability (not future proof) © 2012 Rick Radko, r3df.com 68
  • 70. Single site with plugins benefits With a single site with plugins:  Only one WordPress install to manage/update  Only one theme to manage.  It‟s easy to manage content.  Single dashboard and login.  Easy to link content between languages  Some plugins manage adding language files.  Some plugins help with creating translations of other plugins and themes.  WPML offers integration to a translation service. © 2012 Rick Radko, r3df.com 69
  • 71. Multilingual with multisite Historically single site with plugins has been the most popular technique, but:  Since WordPress 3.0 we have had multisite (network) in the standard version of WordPress.  Multisite allows you to have what appear to be multiple different WordPress sites running on one install of WordPress.  Different themes.  Different URL‟s (if you want)  You would not know it‟s one WordPress. © 2012 Rick Radko, r3df.com 70
  • 72. Multilingual with multisite continued Using multisite allows:  A “single” site approach.  But removes many of the negative issues with independent single site installs. © 2012 Rick Radko, r3df.com 71
  • 73. Installing multisite To enable multisite, you need to perform a short sequence of steps, which include:  Dashboard setting changes.  Cutting and pasting some provided settings into configuration files. There are many guides to walk you through the process:  http://codex.wordpress.org/Create_A_Network  http://halfelf.org/ebooks/wordpress-multisite-101/ © 2012 Rick Radko, r3df.com 72
  • 74. Adding languages to multisite You can start your multisite install with any version of WordPress.  If you use a localized version that will give you one language plus English.  The sample content is in the localized language. To add more languages you need to:  Install the language files manually.  Use the Codestyling Localization plugin. *See “Installing WordPress language files” in the appendix. © 2012 Rick Radko, r3df.com 73
  • 75. Setting multisite languages Once you have language files installed:  An option for site language will appear in the Settings -> General section.  It‟s also in the network admin site settings. © 2012 Rick Radko, r3df.com 74
  • 76. Multilingual with multisite issues  More complicated to install multisite WordPress  Not as simple as the regular 5-min install.  But is not hard either – maybe 10 minutes  Some plugins don‟t run on multisite.  Some duplication of effort to manage sites.  Plugins may need to be configured on each site.  Plugins that store their own data may have separate datasets on each site. This could be an issue for something like registration systems. © 2012 Rick Radko, r3df.com 75
  • 77. More multisite issues  Separate dashboards for each language site.  But there usually is only one login.  Not quite as easy to manage content.  No language connection between content items.  This can be resolved with Language Switcher Plugins for multisite. © 2012 Rick Radko, r3df.com 76
  • 78. Language switcher plugins These plugins help relate content items between the sites and provide widgets for front-end links between different language versions of content. Language switcher plugins:  Multisite Language Switcher  Multilingual Press  More? © 2012 Rick Radko, r3df.com 77
  • 79. Multilingual with multisite benefits  Reduced dependency on the plugins.  If you remove or disable a plugin used to manage language switching, all the sites still work, you just loose the linking between them.  Each site behaves as if it is a single site:  You don‟t need a plugin to manage the front-end site display.  Fewer plugin conflicts.  Sites run normally, no tricks. © 2012 Rick Radko, r3df.com 78
  • 80. Multilingual considerations  Splash page for language choice  Multilingual home page (allows language choice)  Browser or location sniffing – Don‟t!  Merged comments on symmetric content?  Merged is default with qTranslate,  Need plugins for other approaches.  Google (SEO) -> don't mix languages.  Best practice -> one language per page. © 2012 Rick Radko, r3df.com 79
  • 81. Multilingual considerations Domains/url‟s (example pairs for bilingual French)  Single installs site only  yourdomain.com?lang=en  yourdomain.com?lang=fr © 2012 Rick Radko, r3df.com 80
  • 82. Multilingual considerations  Any install type:  yourdomain.com or yourdomain.ca  yourdomain.fr  yourdomain.com/en  yourdomain.com/fr  en.yourdomain.com  fr.yourdomain.com © 2012 Rick Radko, r3df.com 81
  • 83. Contact Rick Radko  email: wpinfo@r3df.com  twitter: @r3designforge Slides at:  www.slideshare.net/r3df © 2012 Rick Radko, r3df.com 82
  • 84. Appendix © 2012 Rick Radko, r3df.com 83
  • 85. Links WordPress in Your Language  http://codex.wordpress.org/WordPress_in_Your_Lang uage Installing WordPress in Your Language  http://codex.wordpress.org/Installing_WordPress_in_ Your_Language Multilingual WordPress  http://codex.wordpress.org/Multilingual_WordPress Translating WordPress  http://codex.wordpress.org/Translating_WordPress © 2012 Rick Radko, r3df.com 84
  • 86. Links Glotpress  http://translate.wordpress.org/getting-started  http://blog.glotpress.org/  http://translate.wordpress.org/projects © 2012 Rick Radko, r3df.com 85
  • 87. Internationalization digging deeper © 2012 Rick Radko, r3df.com 86
  • 88. Checking the files for internationalization  Look in the plugin or theme folder for folders called:  Languages  Language  Lang  i18n  Check for .pot, .mo and .po files.  If any these files exist, then you can create a translation. © 2012 Rick Radko, r3df.com 87
  • 89. Internationalization still not obvious? Go deeper If you are really desperate for a plugin or theme in a language and there is no indication that it is internationalized:  You can check the code for things like:  __(<some text>, some domain)  _e(<some text>, some domain)  If they exist, you may be able to localize it.  You will need to create you own .pot file  This may require a lot of effort For more info see: http://codex.wordpress.org/I18n_for_WordPress_Developers © 2012 Rick Radko, r3df.com 88
  • 90. What are __() and _e()? __() and _e() are the magic in the WordPress code that lets localization work. Example: __(„Hello‟, „twentyeleven‟)  Means look for “Hello” in the language files for the Twenty Eleven theme, for current locale, say fr_FR. That would then return “Bonjour” if the files are loaded, and “Hello” if they are not. For more info see: http://codex.wordpress.org/I18n_for_WordPress_Developers © 2012 Rick Radko, r3df.com 89
  • 91. Creating your own translations © 2012 Rick Radko, r3df.com 90
  • 92. You need .pot, .mo. or .po files to start .POT (Portable Object Template) files are created by the developer they have all text in the __() or _e() functions. .PO (Portable Object) files are plain text files that list all the translation pairs. #: wp-admin/includes/upgrade.php:213 msgid "Hello world!“ msgstr "Bonjour tout le monde&nbsp;!“ .MO (Machine Object) files are compiled versions of the .po files. © 2012 Rick Radko, r3df.com 91
  • 93. You need .pot, .mo. or .po files to start If you can‟t find a .pot, .mo, or .po file for the plugin or theme you want to translate:  Don’t try to translate it!  Try another theme, or plugin. WordPress .pot files, and other .mo, and .po files that you can use as starting points are of course available. © 2012 Rick Radko, r3df.com 92
  • 94. Change existing .mo. or .po files You can often start with an existing .mo or .po file and just change what you need.  If there is something close:  Canadian vs France French  If you only need to change a few items  Tweet Blender See: http://codex.wordpress.org/I18n_for_WordPress_Developers for a lot of important details like naming conventions for your files. © 2012 Rick Radko, r3df.com 93
  • 95. Editing translation files 2 editors I use are:  Poedit - the most commonly mentioned http://www.poedit.net/  available for Windows, Mac and Linux  Virtaal http://translate.sourceforge.net/wiki/virtaal/index  Has translation help  Lets you add terms  available for Windows, Mac and Linux *For a complete list of tools see: http://codex.wordpress.org/Translating_WordPress#Translation_To ols © 2012 Rick Radko, r3df.com 94
  • 96. Poedit © 2012 Rick Radko, r3df.com 95
  • 97. Adding your language files to plugins & themes To install new language files for plugins & themes, add them to the language folder you found when checking out the plugin or theme. Folders called:  Languages  Language  Lang  i18n *Use the same naming convention for your files as the theme or plugin. **Use your hosts cPanel or FTP functions. © 2012 Rick Radko, r3df.com 96
  • 98. Installing WordPress language files © 2012 Rick Radko, r3df.com 97
  • 99. Find the language files Find the needed language files on:  http://codex.wordpress.org/WordPress_in_Your_L anguage OR  http://i18n.svn.wordpress.org/ If the only version on “WordPress in Your Language” is an installer version, it may be easier to get them out of the .zip file than to find them on http://i18n.svn.wordpress.org/. © 2012 Rick Radko, r3df.com 98
  • 100. Add the files to your WordPress install For WordPress to find your language files, they need to be put in the folder at:  <your-site-root>/wp-content/languages/ The official instructions:  http://codex.wordpress.org/Installing_WordPress_ in_Your_Language © 2012 Rick Radko, r3df.com 99

Editor's Notes

  1. I’m Rick RadkoI design &amp; develop software, websites, web applications -&gt; at my company R-Cubed Design Forge -&gt; I started building websites and web apps in 1996.something that is different about me, -&gt;I was originally a hardware design engineer -&gt; But now you will find me mostly with my head buried in computer code -&gt; I’m also equally comfortable doing graphic design workI’ve been using WordPress for over 4 years now: - it’s been my main website platform for the last 2 years - I’m also a co-organizer of The Ottawa WordPress GroupSlides are posted on slideshare -&gt; link will be at the end too