SlideShare a Scribd company logo
1 of 44
Download to read offline
LEVELING UP YOUR
MULTILINGUAL
WORDPRESS SITE
JANNE ALA-ÄIJÄLÄ WORDCAMP FINLAND 15.4.2016
MY PERSONAL LEVEL 1:
POLYLANG
• SMOOTH 

ADMIN WORKFLOW
• ADVANCED 

MULTILINGUAL THEME
• WORKING WITH 

NON-LATIN ALPHABET
TRANSLATION
P O L I S H T H E
WORKFLOW
TO COPY OR
CONTENT DILEMMA:
NOTTO COPY
https://github.com/aucor/polylang-copy-content
HOW TO CHANGE
SHOW YOUR USERS
ADMIN LANGUAGE
AVOID
USEREDITABLE
WIDGETS
AS LONG AS POSSIBLE
THEME
MULTILINGUAL
 💩
if ( $current_language == 'fi' ) {
print 'Moi!';
} elseif ( $current_language == 'sv' ) {
print 'Hej!';
} else {
print 'Hello!';
}
THE USUAL WAY
_e( 'Hello!' , 'my-text-domain' );
ARE AWFUL!
.PO/.MO -FILES
THE PLUGIN WAY
pll_e( 'Hello!' );
THE PLUGIN WAY
USE FALLBACKS
if ( ! function_exists( 'pll__' ) ) {
function pll__( $string ) {
return __( $string , 'my-theme-textdomain' );
}
}
FROM PAGE GENERATION TIME
SHAVING MANY % OFF
* Actual results may vary and terms do apply
*
0
22,5
45
67,5
90
front page post-new.php
default install: 0 plugins
theme: twentysixteen
en fi
0
100
200
300
400
front page post-new.php
15 popular plugins
theme: twentysixteen
+42%
+72%
+74%
+59%
msms
NOT EVEN A SLOTH IS AS SLOW AS
LOAD_TEXTDOMAIN
WHAT IF?
0
22,5
45
67,5
90
front page post-new.php
en fi
0
100
200
300
400
front page post-new.php
+42%
+72%
+74%
+59%
+12%
+30%
+6%
+42%
fi, cached
ms ms
WE CAN!
NOTE: YOU NEED AN OBJECT CACHE LIKE REDIS, MEMCACHED OR APCU
wordpress.org/plugins/wp-performance-pack/
OR ONLY THE CACHEABLE MO LOADING:
github.com/aucor/dynamic-mo-loader
CHOOSING THE BEST
LANGUAGE SELECTOR
"#$%
&'()
FI / SV / EN
LANGUAGE CODES
ET / RU / EL / TR / ZH / JA / HI / AR
suomeksi på Svenska In English
FULL LANGUAGE NAMES == 😍
SUPER ULTIMATE+
WORKING WITH
NON-LATIN
ALPHABET
GLOBAL SHARES OF ALPHABETS & SCRIPTS
Source: http://www.worldstandards.eu/other/alphabets/
Other
14 %
Cyrillic
4 %
Arabic
14 %
Devanagari
14 % Chinese
18 %
Latin
36 %
WEBFONTS
FOR NON-LATIN
CHARACTERS
90%OF DESIGNERS
HAVEN’TCONSIDERED
*
* Number completely made up in my mind
font-family: "MyFancyFontWithLimitedLanguageSupport", cursive;
CASCADING FONT-STACKS
Typographically aethstetic headline
STRÖMSÖ:
Tässä otsikossa on ääkkösiä
REALITY:
CASCADING FONT-STACKS
天⽓气weather
CASCADING FONT-STACKS
font-family: "MyFancySerif", serif;
天⽓气weather
font-family: serif;
CHARACTER SUBSET
Typekit
INCLUDE CORRECT
Google Fonts
NOTO SANS
google.com/get/noto/
google.com/fonts/earlyaccess
GOOGLE WEBFONTS EARLY ACCESS
EASY SOLUTIONS:
TRANSLITERATION
Getting rid of unwanted characters
TRANSLITERATION: WORDPRESS DEFAULT
/tässä-osoitteessa-on-myös-å/
/tassa-osoitteessa-on-myos-a/
TRANSLITERATION: WORDPRESS DEFAULT
/芬兰全国⽓气象预报/
/芬兰全国⽓气象预报/
TRANSLITERATION PLUGINS
CYRILLIC: CYR TO LAT ENHANCED
wordpress.org/plugins/cyr3lat/
CHINESE: SO PINYIN SLUGS
wordpress.org/plugins/so-pinyin-slugs/
ARABIC: ARABIC TO LAT
wordpress.org/plugins/arabic-to-lat/
wordpress.org/plugins/tags/transliteration
RTL
tfel-ot-thgir
CHANGE THE DIRECTION
<html dir="rtl">
RIGHT SHOULD BE LEFT
LEFT SHOULD BE RIGHT
ASSETS FOR RTL
if ( is_rtl() ) {
wp_enqueue_style( 'style-rtl', 

get_stylesheet_directory_uri() . '/css/style-rtl.css' );
wp_enqueue_script( 'script-rtl',
get_stylesheet_directory_uri() . '/js/script-rtl.js' );
}
rtl.css
THINGS TO BE MIRRORED
• floats
• asymmetric margins
• asymmetric paddings
• list styles
• directional JS
THINGS TO BE MIRRORED
EXCEPTION: FLEXBOX
1 2 3
123
DIR=”LTR”:
DIR=”RTL”:
.container { display: flex; }
JANNE ALA-ÄIJÄLÄ
janne@ala-aijala.fi
@j_underdude

More Related Content

Similar to Leveling Up Your Multilingual WordPress site

Rubric student's oral presentation
Rubric  student's oral presentationRubric  student's oral presentation
Rubric student's oral presentationJessicaLuna10
 
Upstate CSCI 450 PHP Chapters 5, 12, 13
Upstate CSCI 450 PHP Chapters 5, 12, 13Upstate CSCI 450 PHP Chapters 5, 12, 13
Upstate CSCI 450 PHP Chapters 5, 12, 13DanWooster1
 
Upstate CSCI 450 PHP
Upstate CSCI 450 PHPUpstate CSCI 450 PHP
Upstate CSCI 450 PHPDanWooster1
 
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)Muhamad Al Imran
 
basic concept of php(Gunikhan sonowal)
basic concept of php(Gunikhan sonowal)basic concept of php(Gunikhan sonowal)
basic concept of php(Gunikhan sonowal)Guni Sonow
 
Creating Multilingual WordPress Websites
Creating Multilingual WordPress WebsitesCreating Multilingual WordPress Websites
Creating Multilingual WordPress WebsitesShawn Hooper
 
How to make multilingual plugins and themes
How to make multilingual plugins and themesHow to make multilingual plugins and themes
How to make multilingual plugins and themesjohnpbloch
 

Similar to Leveling Up Your Multilingual WordPress site (20)

01-basics.ppt
01-basics.ppt01-basics.ppt
01-basics.ppt
 
Rubric student's oral presentation
Rubric  student's oral presentationRubric  student's oral presentation
Rubric student's oral presentation
 
Upstate CSCI 450 PHP Chapters 5, 12, 13
Upstate CSCI 450 PHP Chapters 5, 12, 13Upstate CSCI 450 PHP Chapters 5, 12, 13
Upstate CSCI 450 PHP Chapters 5, 12, 13
 
01 basics
01 basics01 basics
01 basics
 
php basic
php basicphp basic
php basic
 
Prersentation
PrersentationPrersentation
Prersentation
 
Upstate CSCI 450 PHP
Upstate CSCI 450 PHPUpstate CSCI 450 PHP
Upstate CSCI 450 PHP
 
Php mysql
Php mysqlPhp mysql
Php mysql
 
Php tutorial
Php  tutorialPhp  tutorial
Php tutorial
 
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
 
WT_PHP_PART1.pdf
WT_PHP_PART1.pdfWT_PHP_PART1.pdf
WT_PHP_PART1.pdf
 
Perl Moderno
Perl ModernoPerl Moderno
Perl Moderno
 
basic concept of php(Gunikhan sonowal)
basic concept of php(Gunikhan sonowal)basic concept of php(Gunikhan sonowal)
basic concept of php(Gunikhan sonowal)
 
Intro to Dynamic Web Pages
Intro to Dynamic Web PagesIntro to Dynamic Web Pages
Intro to Dynamic Web Pages
 
PHP
PHPPHP
PHP
 
Creating Multilingual WordPress Websites
Creating Multilingual WordPress WebsitesCreating Multilingual WordPress Websites
Creating Multilingual WordPress Websites
 
Php mysql
Php mysqlPhp mysql
Php mysql
 
My cool new Slideshow!
My cool new Slideshow!My cool new Slideshow!
My cool new Slideshow!
 
slidesharenew1
slidesharenew1slidesharenew1
slidesharenew1
 
How to make multilingual plugins and themes
How to make multilingual plugins and themesHow to make multilingual plugins and themes
How to make multilingual plugins and themes
 

Recently uploaded

Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 

Recently uploaded (20)

Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 

Leveling Up Your Multilingual WordPress site