SlideShare une entreprise Scribd logo
1  sur  50
Télécharger pour lire hors ligne
r3df.com
lumostech.training
Rick Radko
“Multisite for Multilingual”
WordCamp Toronto
November 15th, 2014
hello
bonjour
guten tag
Hola
你好
helló
hej
hallo
γειά σου
ciao
sveiki
halló
cześć
alo
안녕하세요
привіт
नमस्त
hallå
© 2012 Rick Radko, r3df.com
A little bit about me
Rick Radko
Software, website and app designer/developer,
trainer, speaker.
 R-Cubed Design Forge: r3df.com
 LumosTech Training: lumostech.training
Creating custom web sites since 1996
WordPress sites since 2008.
 Lead organizer of:
 WordCamp Ottawa 2013, 2014.
 The Ottawa WordPress Group.
1
© 2012 Rick Radko, r3df.com
Making WordPress multilingual
In this session I will present:
 A quick backgrounder on multilingual WordPress
setups.
 Some new 4.0 language features.
 How to quickly install WordPress multisite.
 How to set it up for multilingual sites.
 Pros & Cons of multisite for multilingual.
 Some tips and tricks.
Slides: www.slideshare.net/r3df 2
© 2012 Rick Radko, r3df.com
WordPress is not multilingual!
“WordPress does not support
a bilingual or multilingual blog
out-of-the-box.”
3
codex.wordpress.org/Multilingual_WordPress
© 2012 Rick Radko, r3df.com
WordPress multilingual set-ups
There are 2 common approaches to multilingual in
WordPress:
 Single site approach:
 One WordPress site contains all language content.
 Multisite approach:
 One site per language.
Each approach has pros/cons under different
circumstances.
4
© 2012 Rick Radko, r3df.com
Single site multilingual
With single site, WordPress needs to manage
different language versions of:
 the content,
 the menus,
 the output from: themes, widgets and plugins,
and display them in the right language on every
page.
5
© 2012 Rick Radko, r3df.com
More on single site multilingual
Multilingual plugins for single site:
 WPML $
 qTranslate -> no longer supported
 Use: mqTranslate or qTranslate Plus
 Polylang
 xili-language
 Babble (github)
 + more
6
© 2012 Rick Radko, r3df.com
What is multisite?
 wordpress.com is a multisite.
 Multisite sites:
 Share the same WordPress installation.
 Themes and plugins are available on all sites by
default.
 Have separate database tables and media folders.
 Can share domains (URL's) or have completely
different domains.
 Appear to be independent sites to site visitors.
7
© 2012 Rick Radko, r3df.com
Multilingual with multisite
Advantages of using multisite for multilingual:
 Each site is a regular WordPress site.
 One language per site.
 Can easily have different themes.
 No special tricks needed for sidebars, titles etc.
 Performance.
 No custom tables.
 Fewer plugin issues with:
 Multilingual plugins.
 Other plugins.
 Different domains for different languages.
8
© 2012 Rick Radko, r3df.com
Setting up a multilingual multisite
Begin with a regular "5 Min" WordPress install
 codex.wordpress.org/Installing_WordPress
9
© 2012 Rick Radko, r3df.com
New to WordPress 4.0
Language choice on
install!
10
© 2012 Rick Radko, r3df.com
4.0 language selection
The moment you click
a language, WordPress
switches to that
language.
 Asfd
 asdfadsf
11
© 2012 Rick Radko, r3df.com
The usual install screens - but in French
12
© 2012 Rick Radko, r3df.com
Success! - The dashboard in French
13
© 2012 Rick Radko, r3df.com
The website - in French
14
© 2012 Rick Radko, r3df.com
Language setting in 4.0
There is a new language setting in 4.0:
 It's hidden if there are no added languages.
 English (United States) will always be available as
a choice due to the way WordPress is built.
15
© 2012 Rick Radko, r3df.com
3 quick steps to enable multisite
1. Enable multisite setup.
a. Optional: set a non-default permalink structure.
(Settings -> Permalinks)
2. Complete the Network Setup page.
3. Copy the Network configuration settings to the
required files.
2 of the many guides to that detail the full
process:
 halfelf.org/ebooks/wordpress-multisite-101/
 codex.wordpress.org/Create_A_Network/
16
© 2012 Rick Radko, r3df.com
Step 1 - Enable multisite setup
In your site's wp-config.php:
 Before the: /* That's all, stop editing! … */"
 Add: define( 'WP_ALLOW_MULTISITE', true );
17
© 2012 Rick Radko, r3df.com
Step 2 - Network setup
18
© 2012 Rick Radko, r3df.com
Network setup - key setting
Select sub-directories to get URL's like:
 my-domain.com/en and my-domain.com/fr
19
© 2012 Rick Radko, r3df.com
Step 3 - Network configuration settings
Add the settings shown in part 1. to your
wp−config.php file.
20
© 2012 Rick Radko, r3df.com
Network configuration settings - wp-config.php
Add the settings below the previous line you
added, and above the "… stop editing ..." line.
21
© 2012 Rick Radko, r3df.com
Network configuration settings part 2
Add the second section of settings to the
.htaccess file. (If one does not exist, create one.)
22
© 2012 Rick Radko, r3df.com
Network configuration settings - .htaccess
Replace the original rules
with the new ones from
section 2.
23
© 2012 Rick Radko, r3df.com
And, that's it!
When you have completed the edits:
 Click the login link.
(at the bottom of the settings page)
 Log back in, and check out the site.
24
© 2012 Rick Radko, r3df.com
Network admin
25
© 2012 Rick Radko, r3df.com
Network Admin -> Sites page
In a multisite, the original site from the WordPress
install becomes:
 The main site, with a Site ID of 1.
 The path is "/".
 It's accessed at: http://some_domain.tld.
26
© 2012 Rick Radko, r3df.com
Adding a site
Add a new site with the path “en”:
27
© 2012 Rick Radko, r3df.com
The English site
The English site is URL is:
 http://some_domain.tld/en
28
© 2012 Rick Radko, r3df.com
The French site
The French site URL is:
 http://some_domain.tld
29
© 2012 Rick Radko, r3df.com
Another set-up
Alternatively, all “active” sites can be added as
sub-sites with a language path:
 http://some_domain.tld/fr
 http://some_domain.tld/en
 Etc.
And we hide the main site:
 http://some_domain.tld (is not used)
30
© 2012 Rick Radko, r3df.com
Hiding the main site
2 ways to hide the main site:
1. Redirect to one of the language sites:
 .htaccess code.
 Redirection plugins (there are lots).
github.com/r3df/r3df-multisite-redirect/
2. Use the main site as a language selector by
implementing a “splash” page.
 Governments and large institutions tend to use this
style.
 My WordCamp Montreal talk from 2013, “Tips and
tricks for building multilingual sites” covers how to
do splash pages. (my slideshare and wordpress.tv)31
© 2012 Rick Radko, r3df.com
Multisite language plugins
These plugins will:
 Relate content items between the sites.
 Provide widgets for front-end links between
different language versions of content.
 In some cases connect the editors in dashboards.
Some plugins:
 Multisite Language Switcher
 Multilingual Press
 Zanto WP Translation
 More?
32
© 2012 Rick Radko, r3df.com
Multisite Language Switcher installed
33
© 2012 Rick Radko, r3df.com
The site with a language switcher
A couple of plugins from the repository:
 MslsSelect adds a widget with a selector
 MslsMenu lets you add selectors to menus 34
© 2012 Rick Radko, r3df.com
Shared media libraries
Normally in multisite each sub-site has it's own
media uploads folder.
 For multilingual this may result in uploading
images etc. multiple times, once to each sub-site.
 There is a plugin for that:
 Network Shared Media
35
© 2012 Rick Radko, r3df.com
Issues with multisite for multilingual
Ecommerce can have issues:
 Selling/booking things with fixed inventories
- can’t share inventories between sites.
 Physical products.
 Event registration.
 Booking Calendars
Overstated “issues”:
 You need to set everything up 2 times (or more).
 Menus, plugins, widgets, etc.
 Entering content 2 times (or more).
36
© 2012 Rick Radko, r3df.com
Adding languages to WordPress 4.0
To add more languages to the site:
 Install the plugin
"Language Downloader".
 Need to use Network
Admin -> Plugins.
 Go back to any site
dashboard to run the
plugin.
37
© 2012 Rick Radko, r3df.com
Language setting in multisite
If all went well, the new language is loaded.
Select Spanish on the main site.
38
© 2012 Rick Radko, r3df.com
The website in Spanish
39
© 2012 Rick Radko, r3df.com
Hold it… that's not Spanish!
40
© 2012 Rick Radko, r3df.com
Add language files for themes & plugins
Under Network Admin -> Updates:
 Update translations.
 You need to do
this with the main
site set to the
language needing
updates.
41
© 2012 Rick Radko, r3df.com
Updated plugins and themes:
42
© 2012 Rick Radko, r3df.com
The theme now displays correctly
43
© 2012 Rick Radko, r3df.com
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 login screen language selectors.
 Some Plugins (there are more):
 WP Native Dashboard
wordpress.org/extend/plugins/wp-native-dashboard/
 Backend Localization
wordpress.org/extend/plugins/kau-boys-backend-localization/
44
© 2012 Rick Radko, r3df.com
WP Native Dashboard
45
© 2012 Rick Radko, r3df.com
WP Native Dashboard Fix.
Plugin on Github:
github.com/r3df/r3df-wp-native-dashboard-fix
46
© 2012 Rick Radko, r3df.com
Remove /blog on the main site
A quirk of multisite:
 the main site is forced to have /blog in the path for
the posts.
For a site with posts (a blog) called something
else, like “news”:
 Editing it out of the permalinks in:
Network Admin -> Site->Settings - is not safe
 Often reset unintentionally.
 Plugin on Github to fix it:
github.com/r3df/r3df-multisite-blog-slug-remover
47
© 2012 Rick Radko, r3df.com
Migration tools
 qTranslate Cleanup and WPML Import
wordpress.org/plugins/qtranslate-to-wpml-export/
 WPML2WPMSLS - WPML to Multisite Language
Switcher:
wordpress.org/plugins/wpml2wpmsls/
 WPML to MultilingualPress:
wordpress.org/plugins/wpml-to-multilingualpress/
48
© 2012 Rick Radko, r3df.com
Contact
Rick Radko
 email: wpinfo@r3df.com
 twitter: @r3designforge
Websites:
 r3df.com
 lumostech.training
Slides at:
 www.slideshare.net/r3df
49

Contenu connexe

En vedette

Nacionālās identitātes komunikācija sociālajos tīklos
Nacionālās identitātes komunikācija sociālajos tīklosNacionālās identitātes komunikācija sociālajos tīklos
Nacionālās identitātes komunikācija sociālajos tīklos
nacionalaidentitate
 
открытый решение показательных уравненийй 11 кл
открытый решение показательных уравненийй 11 клоткрытый решение показательных уравненийй 11 кл
открытый решение показательных уравненийй 11 кл
kravhenko
 
открытый урок кравченко
открытый урок кравченкооткрытый урок кравченко
открытый урок кравченко
kravhenko
 
The layers of the earth
The layers of the earthThe layers of the earth
The layers of the earth
NMMP
 
Vocera How-to slides
Vocera How-to slidesVocera How-to slides
Vocera How-to slides
Meagan Rudy
 
RoboScan1M brochure
RoboScan1M brochureRoboScan1M brochure
RoboScan1M brochure
riskis
 
Ppt ips metode pembelajaran
Ppt ips metode pembelajaranPpt ips metode pembelajaran
Ppt ips metode pembelajaran
rizka_pratiwi
 
Customer+orientation factor analysis
Customer+orientation factor analysisCustomer+orientation factor analysis
Customer+orientation factor analysis
Rupaam Deb
 

En vedette (20)

Традиционный народный костюм Великоустюгской земли
Традиционный народный костюм Великоустюгской землиТрадиционный народный костюм Великоустюгской земли
Традиционный народный костюм Великоустюгской земли
 
Developing Writing Skills
Developing Writing SkillsDeveloping Writing Skills
Developing Writing Skills
 
Nacionālās identitātes komunikācija sociālajos tīklos
Nacionālās identitātes komunikācija sociālajos tīklosNacionālās identitātes komunikācija sociālajos tīklos
Nacionālās identitātes komunikācija sociālajos tīklos
 
How clicks are measured
How clicks are measuredHow clicks are measured
How clicks are measured
 
Cc hub code camp presentation
Cc hub  code camp presentationCc hub  code camp presentation
Cc hub code camp presentation
 
открытый решение показательных уравненийй 11 кл
открытый решение показательных уравненийй 11 клоткрытый решение показательных уравненийй 11 кл
открытый решение показательных уравненийй 11 кл
 
открытый урок кравченко
открытый урок кравченкооткрытый урок кравченко
открытый урок кравченко
 
The layers of the earth
The layers of the earthThe layers of the earth
The layers of the earth
 
Paris At Night
Paris At NightParis At Night
Paris At Night
 
Controlling
ControllingControlling
Controlling
 
Embriologia
EmbriologiaEmbriologia
Embriologia
 
Vocera How-to slides
Vocera How-to slidesVocera How-to slides
Vocera How-to slides
 
RoboScan1M brochure
RoboScan1M brochureRoboScan1M brochure
RoboScan1M brochure
 
Dogs Underwater
Dogs UnderwaterDogs Underwater
Dogs Underwater
 
Virus antivirus
Virus antivirusVirus antivirus
Virus antivirus
 
Substitution
SubstitutionSubstitution
Substitution
 
Ppt ips metode pembelajaran
Ppt ips metode pembelajaranPpt ips metode pembelajaran
Ppt ips metode pembelajaran
 
Ppt tshirtz
Ppt tshirtzPpt tshirtz
Ppt tshirtz
 
Customer+orientation factor analysis
Customer+orientation factor analysisCustomer+orientation factor analysis
Customer+orientation factor analysis
 
Consrtuction bonds
Consrtuction bondsConsrtuction bonds
Consrtuction bonds
 

Similaire à Multisite for multilingual

Similaire à Multisite for multilingual (20)

Intro to WordPress Plugin Development
Intro to WordPress Plugin DevelopmentIntro to WordPress Plugin Development
Intro to WordPress Plugin Development
 
Introduction to WordPress
Introduction to WordPressIntroduction to WordPress
Introduction to WordPress
 
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
 
A peek into the world of WordPress plugin development
A peek into the world of WordPress plugin developmentA peek into the world of WordPress plugin development
A peek into the world of WordPress plugin development
 
How to WordPress: the basics, part 2
How to WordPress:  the basics, part 2How to WordPress:  the basics, part 2
How to WordPress: the basics, part 2
 
Introduction to WordPress for Beginners
Introduction to WordPress for BeginnersIntroduction to WordPress for Beginners
Introduction to WordPress for Beginners
 
Backups, Backups, Backups
Backups, Backups, BackupsBackups, Backups, Backups
Backups, Backups, Backups
 
Introduction to WordPress, WordCamp Ottawa 2019
Introduction to WordPress, WordCamp Ottawa 2019Introduction to WordPress, WordCamp Ottawa 2019
Introduction to WordPress, WordCamp Ottawa 2019
 
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...
 
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
 
WordPress website backups – they're not optional
WordPress website backups – they're not optionalWordPress website backups – they're not optional
WordPress website backups – they're not optional
 
Introduction to WordPress - WordCamp Ottawa 2019
Introduction to WordPress - WordCamp Ottawa 2019Introduction to WordPress - WordCamp Ottawa 2019
Introduction to WordPress - WordCamp Ottawa 2019
 
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
 
Finding themes for your WordPress site
Finding themes for your WordPress siteFinding themes for your WordPress site
Finding themes for your WordPress site
 
Gutenberg - The future of WordPress
Gutenberg - The future of WordPressGutenberg - The future of WordPress
Gutenberg - The future of WordPress
 
Getting started with IBM Rational Rhapsody in Ada
Getting started with IBM Rational Rhapsody in AdaGetting started with IBM Rational Rhapsody in Ada
Getting started with IBM Rational Rhapsody in Ada
 
2011 05 word-press-not-just-for-blogging-anymore
2011 05 word-press-not-just-for-blogging-anymore2011 05 word-press-not-just-for-blogging-anymore
2011 05 word-press-not-just-for-blogging-anymore
 
WordPress customizer: for themes and more
WordPress customizer: for themes and moreWordPress customizer: for themes and more
WordPress customizer: for themes and more
 
Gutenberg: Revolutionizing your WordPress site
Gutenberg: Revolutionizing your WordPress siteGutenberg: Revolutionizing your WordPress site
Gutenberg: Revolutionizing your WordPress site
 
Using Delphi as a no code development environment
Using Delphi as a no code development environmentUsing Delphi as a no code development environment
Using Delphi as a no code development environment
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

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...
 
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
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
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...
 
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
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

Multisite for multilingual

  • 1. r3df.com lumostech.training Rick Radko “Multisite for Multilingual” WordCamp Toronto November 15th, 2014 hello bonjour guten tag Hola 你好 helló hej hallo γειά σου ciao sveiki halló cześć alo 안녕하세요 привіт नमस्त hallå
  • 2. © 2012 Rick Radko, r3df.com A little bit about me Rick Radko Software, website and app designer/developer, trainer, speaker.  R-Cubed Design Forge: r3df.com  LumosTech Training: lumostech.training Creating custom web sites since 1996 WordPress sites since 2008.  Lead organizer of:  WordCamp Ottawa 2013, 2014.  The Ottawa WordPress Group. 1
  • 3. © 2012 Rick Radko, r3df.com Making WordPress multilingual In this session I will present:  A quick backgrounder on multilingual WordPress setups.  Some new 4.0 language features.  How to quickly install WordPress multisite.  How to set it up for multilingual sites.  Pros & Cons of multisite for multilingual.  Some tips and tricks. Slides: www.slideshare.net/r3df 2
  • 4. © 2012 Rick Radko, r3df.com WordPress is not multilingual! “WordPress does not support a bilingual or multilingual blog out-of-the-box.” 3 codex.wordpress.org/Multilingual_WordPress
  • 5. © 2012 Rick Radko, r3df.com WordPress multilingual set-ups There are 2 common approaches to multilingual in WordPress:  Single site approach:  One WordPress site contains all language content.  Multisite approach:  One site per language. Each approach has pros/cons under different circumstances. 4
  • 6. © 2012 Rick Radko, r3df.com Single site multilingual With single site, WordPress needs to manage different language versions of:  the content,  the menus,  the output from: themes, widgets and plugins, and display them in the right language on every page. 5
  • 7. © 2012 Rick Radko, r3df.com More on single site multilingual Multilingual plugins for single site:  WPML $  qTranslate -> no longer supported  Use: mqTranslate or qTranslate Plus  Polylang  xili-language  Babble (github)  + more 6
  • 8. © 2012 Rick Radko, r3df.com What is multisite?  wordpress.com is a multisite.  Multisite sites:  Share the same WordPress installation.  Themes and plugins are available on all sites by default.  Have separate database tables and media folders.  Can share domains (URL's) or have completely different domains.  Appear to be independent sites to site visitors. 7
  • 9. © 2012 Rick Radko, r3df.com Multilingual with multisite Advantages of using multisite for multilingual:  Each site is a regular WordPress site.  One language per site.  Can easily have different themes.  No special tricks needed for sidebars, titles etc.  Performance.  No custom tables.  Fewer plugin issues with:  Multilingual plugins.  Other plugins.  Different domains for different languages. 8
  • 10. © 2012 Rick Radko, r3df.com Setting up a multilingual multisite Begin with a regular "5 Min" WordPress install  codex.wordpress.org/Installing_WordPress 9
  • 11. © 2012 Rick Radko, r3df.com New to WordPress 4.0 Language choice on install! 10
  • 12. © 2012 Rick Radko, r3df.com 4.0 language selection The moment you click a language, WordPress switches to that language.  Asfd  asdfadsf 11
  • 13. © 2012 Rick Radko, r3df.com The usual install screens - but in French 12
  • 14. © 2012 Rick Radko, r3df.com Success! - The dashboard in French 13
  • 15. © 2012 Rick Radko, r3df.com The website - in French 14
  • 16. © 2012 Rick Radko, r3df.com Language setting in 4.0 There is a new language setting in 4.0:  It's hidden if there are no added languages.  English (United States) will always be available as a choice due to the way WordPress is built. 15
  • 17. © 2012 Rick Radko, r3df.com 3 quick steps to enable multisite 1. Enable multisite setup. a. Optional: set a non-default permalink structure. (Settings -> Permalinks) 2. Complete the Network Setup page. 3. Copy the Network configuration settings to the required files. 2 of the many guides to that detail the full process:  halfelf.org/ebooks/wordpress-multisite-101/  codex.wordpress.org/Create_A_Network/ 16
  • 18. © 2012 Rick Radko, r3df.com Step 1 - Enable multisite setup In your site's wp-config.php:  Before the: /* That's all, stop editing! … */"  Add: define( 'WP_ALLOW_MULTISITE', true ); 17
  • 19. © 2012 Rick Radko, r3df.com Step 2 - Network setup 18
  • 20. © 2012 Rick Radko, r3df.com Network setup - key setting Select sub-directories to get URL's like:  my-domain.com/en and my-domain.com/fr 19
  • 21. © 2012 Rick Radko, r3df.com Step 3 - Network configuration settings Add the settings shown in part 1. to your wp−config.php file. 20
  • 22. © 2012 Rick Radko, r3df.com Network configuration settings - wp-config.php Add the settings below the previous line you added, and above the "… stop editing ..." line. 21
  • 23. © 2012 Rick Radko, r3df.com Network configuration settings part 2 Add the second section of settings to the .htaccess file. (If one does not exist, create one.) 22
  • 24. © 2012 Rick Radko, r3df.com Network configuration settings - .htaccess Replace the original rules with the new ones from section 2. 23
  • 25. © 2012 Rick Radko, r3df.com And, that's it! When you have completed the edits:  Click the login link. (at the bottom of the settings page)  Log back in, and check out the site. 24
  • 26. © 2012 Rick Radko, r3df.com Network admin 25
  • 27. © 2012 Rick Radko, r3df.com Network Admin -> Sites page In a multisite, the original site from the WordPress install becomes:  The main site, with a Site ID of 1.  The path is "/".  It's accessed at: http://some_domain.tld. 26
  • 28. © 2012 Rick Radko, r3df.com Adding a site Add a new site with the path “en”: 27
  • 29. © 2012 Rick Radko, r3df.com The English site The English site is URL is:  http://some_domain.tld/en 28
  • 30. © 2012 Rick Radko, r3df.com The French site The French site URL is:  http://some_domain.tld 29
  • 31. © 2012 Rick Radko, r3df.com Another set-up Alternatively, all “active” sites can be added as sub-sites with a language path:  http://some_domain.tld/fr  http://some_domain.tld/en  Etc. And we hide the main site:  http://some_domain.tld (is not used) 30
  • 32. © 2012 Rick Radko, r3df.com Hiding the main site 2 ways to hide the main site: 1. Redirect to one of the language sites:  .htaccess code.  Redirection plugins (there are lots). github.com/r3df/r3df-multisite-redirect/ 2. Use the main site as a language selector by implementing a “splash” page.  Governments and large institutions tend to use this style.  My WordCamp Montreal talk from 2013, “Tips and tricks for building multilingual sites” covers how to do splash pages. (my slideshare and wordpress.tv)31
  • 33. © 2012 Rick Radko, r3df.com Multisite language plugins These plugins will:  Relate content items between the sites.  Provide widgets for front-end links between different language versions of content.  In some cases connect the editors in dashboards. Some plugins:  Multisite Language Switcher  Multilingual Press  Zanto WP Translation  More? 32
  • 34. © 2012 Rick Radko, r3df.com Multisite Language Switcher installed 33
  • 35. © 2012 Rick Radko, r3df.com The site with a language switcher A couple of plugins from the repository:  MslsSelect adds a widget with a selector  MslsMenu lets you add selectors to menus 34
  • 36. © 2012 Rick Radko, r3df.com Shared media libraries Normally in multisite each sub-site has it's own media uploads folder.  For multilingual this may result in uploading images etc. multiple times, once to each sub-site.  There is a plugin for that:  Network Shared Media 35
  • 37. © 2012 Rick Radko, r3df.com Issues with multisite for multilingual Ecommerce can have issues:  Selling/booking things with fixed inventories - can’t share inventories between sites.  Physical products.  Event registration.  Booking Calendars Overstated “issues”:  You need to set everything up 2 times (or more).  Menus, plugins, widgets, etc.  Entering content 2 times (or more). 36
  • 38. © 2012 Rick Radko, r3df.com Adding languages to WordPress 4.0 To add more languages to the site:  Install the plugin "Language Downloader".  Need to use Network Admin -> Plugins.  Go back to any site dashboard to run the plugin. 37
  • 39. © 2012 Rick Radko, r3df.com Language setting in multisite If all went well, the new language is loaded. Select Spanish on the main site. 38
  • 40. © 2012 Rick Radko, r3df.com The website in Spanish 39
  • 41. © 2012 Rick Radko, r3df.com Hold it… that's not Spanish! 40
  • 42. © 2012 Rick Radko, r3df.com Add language files for themes & plugins Under Network Admin -> Updates:  Update translations.  You need to do this with the main site set to the language needing updates. 41
  • 43. © 2012 Rick Radko, r3df.com Updated plugins and themes: 42
  • 44. © 2012 Rick Radko, r3df.com The theme now displays correctly 43
  • 45. © 2012 Rick Radko, r3df.com 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 login screen language selectors.  Some Plugins (there are more):  WP Native Dashboard wordpress.org/extend/plugins/wp-native-dashboard/  Backend Localization wordpress.org/extend/plugins/kau-boys-backend-localization/ 44
  • 46. © 2012 Rick Radko, r3df.com WP Native Dashboard 45
  • 47. © 2012 Rick Radko, r3df.com WP Native Dashboard Fix. Plugin on Github: github.com/r3df/r3df-wp-native-dashboard-fix 46
  • 48. © 2012 Rick Radko, r3df.com Remove /blog on the main site A quirk of multisite:  the main site is forced to have /blog in the path for the posts. For a site with posts (a blog) called something else, like “news”:  Editing it out of the permalinks in: Network Admin -> Site->Settings - is not safe  Often reset unintentionally.  Plugin on Github to fix it: github.com/r3df/r3df-multisite-blog-slug-remover 47
  • 49. © 2012 Rick Radko, r3df.com Migration tools  qTranslate Cleanup and WPML Import wordpress.org/plugins/qtranslate-to-wpml-export/  WPML2WPMSLS - WPML to Multisite Language Switcher: wordpress.org/plugins/wpml2wpmsls/  WPML to MultilingualPress: wordpress.org/plugins/wpml-to-multilingualpress/ 48
  • 50. © 2012 Rick Radko, r3df.com Contact Rick Radko  email: wpinfo@r3df.com  twitter: @r3designforge Websites:  r3df.com  lumostech.training Slides at:  www.slideshare.net/r3df 49