You can find WPML’s full guide to string translation here: WPML String Translation — So, you’ll want to first familiarize yourself with this process.
Now that you understand how WPML string translation works, let’s just quickly discuss how the text strings are organized in Theme Blvd themes for localization.
When an author creates a WordPress theme they format all of their outputted text strings something like this with their registered text domain:
__( 'The text string people see.', 'text_domain' )
It is common for WordPress themes to use a single text domain for all of their outputted text strings and register only that one. However, with Theme Blvd themes, you’ll notice that there are actually two separate registered text domains.
- themeblvd – These text strings make up the bulk of text strings you’ll need to translate. However, these text strings are only present in the theme’s Admin panel pages.
__( 'A WP admin text string.', 'themeblvd' )
- themeblvd_front – These are all of the text strings that the theme places on the frontend of your website.
__( 'A frontend text string.', 'themeblvd_front' )
If you’re manually localizing your Theme Blvd theme, this won’t really make much of a difference to you; you’ll still need to individually find the frontend text strings if you’re looking to only translate the frontend of your website. However, when working with WPML, this can make your life a whole lot easier in some cases.
Note: This is actually one of the secrets behind how our Theme Blvd String Swap plugin works to allow you to translate the frontend text strings of your website. If you’re looking for a simple alternative to localization and you’re not creating a multilingual website, you should check it out.
Using WPML’s “String Translation” Add-on
We actually decided to start organizing our text domains in this way after we started experimenting with WPML and their “String Translation” add-on. This add-on comes within their Multilingual CMS package and makes it extremely easy to translate your WordPress theme’s text strings without having to manually create your own PO and MO files with softwares such as poEdit.
When WPML locates the text strings for your Theme Blvd themes in order to link you to the string translation add-on, you will see both of our text domains.
As you can see in the example theme above, there are over 850 text strings in which only about 50 are actually text strings that appear on the frontend of your website.
So, by separating the text strings out into two groupings, we hope it makes things easier if you’re just trying to locate the frontend text strings only, opposed to sifting through a list of 850+ stings. — And if you’re looking to translate everything, you still have that option, as well.