From the course: WordPress: Internationalization
Unlock the full course today
Join today to access over 23,100 courses taught by industry experts.
Add text domain and set domain path - WordPress Tutorial
From the course: WordPress: Internationalization
Add text domain and set domain path
- [Instructor] So to get started, I have a local installation of WordPress up and running. And you can see I have no plugins yet. I'm going to head over to my code editor where I have this install opened up. And in my plugins folder, I'm going to start by adding a new folder for my plugin, to-the-top, to-the-top. And from there, I'll add my main plugin file by the same name. I'll start by opening up my PHP brackets. The next thing I want to do from here is add a header block. I will head over to the word WordPress docs and I'm going to actually go and just copy this header block here and paste that into my file. That way I don't have to type it all out. And I'm going to update this with my own information. I'm not going to spend a lot of time here explaining this header block, but what I do want to point out is this text domain and the domain path. We know that the text domain is what we'll use to identify all of the…
Contents
-
-
-
-
-
-
-
(Locked)
Introducing the project1m 50s
-
(Locked)
Best practices for internationalization1m 36s
-
(Locked)
Add text domain and set domain path2m 9s
-
(Locked)
Add translation functions to PHP3m 7s
-
(Locked)
Create and enqueue a script with wp18n4m 20s
-
(Locked)
Add translation functions to JavaScript3m 9s
-
(Locked)
Create a translation file3m 35s
-
(Locked)
Include an additional translation with your plugin3m 1s
-
(Locked)
Generate MO and JSON files3m 54s
-
(Locked)
Load translations7m 18s
-
(Locked)
-
-
-