Jonathan Bossenger
Let’s Code
Learn.WordPress.org
Internationalisation in Block Themes
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
Learn.WordPress.org
Let's code!
Internationalisation in
Block Themes
Jonathan Bossenger
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.
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/
Learning Outcomes
○ What is Internationalisation?
○ How Internationalisation works in classic themes?
○ How to enable Internationalisation in block themes?
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
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/
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/
10
Let’s code.
Resources
○ https://learn.wordpress.org/individual-learner-survey/
○ Create Block Theme plugin - https://wordpress.org/plugins/create-block-theme/
○ https://developer.wordpress.org/apis/handbook/internationalization/
○ https://developer.wordpress.org/apis/handbook/internationalization/internationalization-
functions/
○ https://wordpress.tv/2022/10/21/lets-code-using-block-patterns-in-your-block-theme/
○ https://developer.wordpress.org/themes/advanced-topics/block-patterns/
Resources 2
○ https://developer.wordpress.org/apis/handbook/internationalization/internationalizatio
n-guidelines/
○ https://www.php.net/manual/en/function.date.php
○ https://developer.wordpress.org/reference/functions/__/
○ https://www.php.net/manual/en/function.printf.php
○ https://developer.wordpress.org/reference/functions/esc_html__/
○ https://developer.wordpress.org/reference/functions/esc_url/

Internationalisation in Block Themes.pptx

  • 1.
  • 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
  • 3.
  • 4.
    Announcements ○ Welcome, andthank 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 considertaking 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 ○ Whatis Internationalisation? ○ How Internationalisation works in classic themes? ○ How to enable Internationalisation in block themes?
  • 7.
    Objectives 1 1. Createa 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? ○ ThePolyglots 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/
  • 10.
  • 11.
    Resources ○ https://learn.wordpress.org/individual-learner-survey/ ○ CreateBlock Theme plugin - https://wordpress.org/plugins/create-block-theme/ ○ https://developer.wordpress.org/apis/handbook/internationalization/ ○ https://developer.wordpress.org/apis/handbook/internationalization/internationalization- functions/ ○ https://wordpress.tv/2022/10/21/lets-code-using-block-patterns-in-your-block-theme/ ○ https://developer.wordpress.org/themes/advanced-topics/block-patterns/
  • 12.
    Resources 2 ○ https://developer.wordpress.org/apis/handbook/internationalization/internationalizatio n-guidelines/ ○https://www.php.net/manual/en/function.date.php ○ https://developer.wordpress.org/reference/functions/__/ ○ https://www.php.net/manual/en/function.printf.php ○ https://developer.wordpress.org/reference/functions/esc_html__/ ○ https://developer.wordpress.org/reference/functions/esc_url/

Editor's Notes

  • #2 TITLE SLIDE: Make a copy of this presentation to your Google Drive, and edit to replace with your details.