In this session, we will take a brief look at what Internationalisation (or i18n) in themes means, as well as cover the common Internationalisation functions available in WordPress, and how to use them. We'll then create a blank block theme, and then take a look at the strings that we might need to make translation ready, as well as how to achieve this.
2. 2
👋🏽
Welcome!
As you join, please get
your local WordPress
install ready:
Install and activate the following plugins:
• Create Block Theme plugin -
https://wordpress.org/plugins/create-block-theme/
Then, let everyone know in the chat where you’re joining
us from…
Hello!
○ My name is Jonathan Bossenger
○ From Cape Town, South Africa
○ Ex-developer turned code instructor
○ Sponsored contributor at Automattic
○ @jon_bossenger in Twitter
4. Announcements
○ Welcome, and thank you to Kathryn for co-hosting today!
○ We’ll be presenting in focus mode, but please consider enabling your video.
○ You are welcome to ask questions.
○ You are welcome to unmute to ask questions, or post them in the chat.
5. Announcements
○ Please consider taking the Learn WordPress Learner Survey
• https://learn.wordpress.org/individual-learner-survey/
○ Make sure your local install is ready
• Create Block Theme plugin - https://wordpress.org/plugins/create-block-theme/
○ If I am going too fast, please let me know!
○ We will be posting this session to https://wordpress.tv/ afterwards
○ For more WordPress focused content please visit https://learn.wordpress.org/
6. Learning Outcomes
○ What is Internationalisation?
○ How Internationalisation works in classic themes?
○ How to enable Internationalisation in block themes?
7. Objectives 1
1. Create a brand new blank theme and activate it
2. Create the footer “credits”
a. Proudly powered by
b. Copyright
3. Enable Internationalisation for human readable text
a. Basic translation functions
b. Translate and echo functions
c. Translate and escape functions
d. Translate, escape, and echo functions
7
8. What Internationalisation?
○ https://developer.wordpress.org/apis/handbook/internationalization/
○ Internationalization is the process of developing your application in a way it can easily be
translated into other languages.
○ Aka i18n
○ In WordPress development, there are a series of predefined i18n functions
○ https://developer.wordpress.org/apis/handbook/internationalization/internationalization-
functions/
9. What Internationalisation?
○ The Polyglots team takes the strings from these functions and translates them
○ https://make.wordpress.org/polyglots/
○ https://translate.wordpress.org/
○ Let’s look at how i18n is implemented in TT1
○ How do we implement i18n in block themes
○ https://wordpress.tv/2022/10/21/lets-code-using-block-patterns-in-your-block-theme/