How to work with multiple text domains?

I am talking about localization / internationalization of Wordpress.

I have two templates made by a third party. And they made them twenty baby patterns. Apparently, they saved template files with internationalized strings with a text domain as 'twentyten' . Now that I have prepared two sites for bilingual English / Arabic. I found that I need a unique text domain to be used. I used keywords for the site.

When I created the .po file, I found that all the contents of the functions _e(), __(), _x(), _n() were combined into a .po file, but since my functions.php contain one text domain with the load_theme_textdomain function. Only rows that have this text domain are displayed. Others appear in English.

I want to hear from experienced developers. How they coexist with a similar scenario. Now I convert all text domains into one so that my site looks good. But I just work extra or there was a simple or modular way to do this.

+4
source share
1 answer

You can use translated strings with a child theme using load_child_theme_text_domain() . This is the right way to script the parent and child themes. Thus, you can use strings from the parent for some uses and strings from children for others.

+4
source

All Articles