The Stallion Responsive WordPress SEO Package includes built in WordPress language translation support that does NOT require creating po files for the theme or similar hard to understand features.
In a nutshell everything output by Stallion Responsive to your website visitors can easily be modified to any language on the planet on one simple to use options page. It is simple to use, under “Stallion Theme” >> “Language Options” there are less than 40 options for adding your own language translation plus some default language translations that work alongside the WordPress core language translations.
WordPress Language Localization
In WordPress 4 there’s a new feature for selecting a language during initial installation allowing easy WordPress localization, this removes the need for downloading and installing WordPress in your language like you had to do for WordPress 3.9.2 and earlier versions of WordPress: was much harder to setup localization pre WP 4.0.
For a new WordPress 4 install select one of the 40 languages WordPress 4.0 is currently localized for by default.
en = English (United States)
ar = العربية
az = Azərbaycan dili
bs = Bosanski
ca = Català
cy = Cymraeg
da_DK = Dansk
de_DE = Deutsch
en_AU = English (Australia)
en_GB = English (UK)
en_CA = English (Canada)
es_ES = Español
eu = Euskara
fa_IR = ادامه = فارسی
fi = Jatka = Suomi
fr_FR = Continuer = Français
gd = Gàidhlig
gl_ES = Galego
he_IL = עִבְרִית
hr = Hrvatski
hu_HU = Magyar
id_ID = Bahasa Indonesia
it_IT = Italiano
ja = 日本語
ko_KR = 계속 = 한국어
my_MM = ဗမာစာ
nl_NL = Nederlands
nb_NO = Norsk bokmål
pt_BR = Português do Brasil
pt_PT = Português
ru_RU = Русский
sk_SK = Slovenčina
es_CL = Español de Chile
es_PE = Español de Perú
sr_RS = Српски језик
sv_SE = Svenska
th = ไทย
tr_TR = Türkçe
zh_TW = 繁體中文
zh_CN = 简体中文
After setting up WordPress to use your language everything handled by WordPress core should be translated to your language, for example the output from default WordPress widgets like Monthly Archives, Categories, Tagcloud etc… should automatically use the localized language selected.
WordPress Theme Language Translation
WordPress core doesn’t have control over the language translation of WordPress themes and plugins. Many WordPress themes and plugins offer language translations that use a po file. This is a file generated by a program which maps parts of a theme/plugin to the po file it’s described at http://codex.wordpress.org/Translating_WordPress and it’s a PAIN to use and manage: make a small change to a plugin/theme and the po files needs rebuilding!
Stallion Responsive doesn’t use this option, Stallion includes a custom built language translation feature which makes creating a translation on the fly really easy.
The screenshot below shows the built in translations, click the screenshot to see the entire options page.
Currently (Stallion Responsive 8.1) the following languages are translated:
English : en-english.php (Defaults)
Arabic : ar-arabic.php (Google Translation)
Bengali : bn_BD-bengali.php (Google Translation)
Chinese : zh_CN-chinese.php (Google Translation)
German : de_DE-german.php (Google Translation)
French : fr_FR-french.php (Google Translation)
Hebrew : he_IL-hebrew.php (Google Translation)
Hindi : hi_IN-hindi.php (Google Translation)
Italian : it_IT-italian.php (Google Translation)
Japanese : ja-japanese.php (Google Translation)
Malay : ms_MY-Malay.php (Google Translation)
Norwegian : nn_NO-norwegian.php (User Translation)
Persian : fa_IR-persian.php (Google Translation)
Polish : pl_PL-polish.php (User Translation)
Portuguese Brazilian : pt_BR-portuguese-brazilian.php (Google Translation)
Portuguese European : pt_PT-portuguese-european.php (Google Translation)
Russian : ru_RO-russian.php (Google Translation)
Spanish : es_ES-spanish.php (User Translation)
Thai : th-thai.php (Google Translation)
Urdu : urdu-urdu.php (Google Translation)
Tick the relevant tick box on the “Stallion Theme” >> “Language Options” page and click “Save Settings” and the language selected will be used.
You will note most of the translations are Google Translations, it’s really easy to create a new translation if one of the above isn’t suitable.
WordPress Language Translator
Go to the following URL (It’s the Google Translator) and select your language on the right.
You now have a Google translation for all words and phrases used by Stallion Responsive that your visitors sees.
You can either add them directly to the Stallion Language Options page (copy and paste) or add them to a custom language translation file.
You’ll find the custom language file at:
You can either modify the above file or make a copy of the file into the child theme folder and modify the child theme file instead at:
By copying the file to the child theme folder it won’t be overwritten when you update Stallion Responsive.
Edit zz-custom-language.php in a text editor (I use Notepad++ it’s free) and you’ll find full instructions within.
Creating a Language Translation
It’s really easy to modify, you’ll find lines of code like these (there’s only 38 words/phrases to translate the entire SEO package):
$st_options10[‘st_lang_comname’] = ‘Name’; # Name
$st_options10[‘st_lang_commail’] = ‘Mail (not published)’; # Mail (not published)
$st_options10[‘st_lang_comweb’] = ‘Website’; # Website
To convert to French for example you would change to the French translation:
$st_options10[‘st_lang_comname’] = ‘nom’; # Name
$st_options10[‘st_lang_commail’] = ‘Mail (non publié)’; # Mail (not published)
$st_options10[‘st_lang_comweb’] = ‘site Web’; # Website
If you want your translation included into Stallion Responsive send me a copy of your modified zz-custom-language.php file and I’ll add it to the next update. I’m your typical ignorant British person, I only understand English fluently, so be sure to let me know which language you translated as I won’t know which it is :-)