Adding a New Language
By default, Premium Exchanger only supports two languages: Russian and English.
You can also add new languages:
To do this, add the appropriate filter to the hooks plugin at the end of the file wp-content/plugins/premiumhook/premiumhook.php
. In the "Plugins" section, activate the "Premium Exchanger hooks" plugin:

Data is added according to the ISO 3166-1 standard.
After adding a language through the filter, additional input fields will appear in the admin panel. However, that’s not all—our plugin, theme, and WordPress still don’t recognize the new language, so all text will default to English.
You will need to download the translation program Poedit. The program has two modes: paid and free. Either mode will work for our purposes, but the paid version allows you to automatically translate all strings from the file.
Localization for WordPress (Basic WordPress Options)
Use any search engine to find the necessary WordPress version, for example, by searching for "WordPress in Kazakh." Download the appropriate distribution.
In the downloaded distribution, open the folder
wp-content/languages/
and copy the localization files to your site.
These files will have a prefix; for example, in the Kazakh version, they are:
kk_KZ.po
kk_KZ.mo
kk_KZ.php
Localization of the Premium Exchanger Theme (Client Side)
Open the theme folder:
wp-content/themes/your_theme_name/lang/
.Download the files
ru_RU.po
andru_RU.mo
, then rename them to your prefix. You should end up with files namedkk_KZ.po
andkk_KZ.mo
.Open the
kk_KZ.po
file in Poedit.Click on the line you want to translate. The original English text will appear on the left, and the text for your language version will appear on the right.
After making your changes, save the file and upload it to the folder mentioned above. Your theme is now localized.
Localization of the Premium Exchanger Plugin (Admin Panel)
Open the plugin folder:
wp-content/plugins/premiumbox/languages/
.Download the files
pn-ru_RU.po
andpn-ru_RU.mo
, then rename them to your prefix. You should end up with files namedpn-kk_KZ.po
andpn-kk_KZ.mo
.Open the
pn-kk_KZ.po
file in Poedit.Click on the line you want to translate. The original English text will appear on the left, and the text for your language version will appear on the right.
After making your changes, save the file and upload it to the folder mentioned above. The plugin is now localized as well.
Localization of the Premium Exchanger Framework (Admin Panel)
Open the framework folder:
wp-content/plugins/premiumbox/premium/languages/
.Download the files
pn-ru_RU.po
andpn-ru_RU.mo
, then rename them to your prefix. You should end up with files namedpn-kk_KZ.po
andpn-kk_KZ.mo
.Open the
pn-kk_KZ.po
file in Poedit.Click on the line you want to translate. The original English text will appear on the left, and the text for your language version will appear on the right.
After making your changes, save the file and upload it to the folder mentioned above. The framework is now localized as well.
After completing all these steps, add a flag icon with the appropriate prefix—kk_KZ_eng.png
(make sure it’s in _eng.png format) to the plugin section wp-content/plugins/premiumbox/flags/
.
After adding new languages, be sure to check that the Premium Exchanger hooks plugin is activated in the "Plugins" section, or activate it if it has been disabled.
Last updated