All themes include some words which are fixed and written directly in theme files.
This tutorial shows you how you change these words without necessary change in files. It will significantly save your time related to theme and plugins update because you will not need edit files again after update.
All words from theme files located at one place
All words which come from theme and plugins are located in AIT Languages plugin. Translation PO files may be found in following folders, inside zip package named
- Theme Admin – ./wp-content/plugins/ait-languages/ait/languages/ait-theme/admin-LanguageCode.po
- Theme Frontend – ./wp-content/plugins/ait-languages/ait/languages/ait-theme/LanguageCode.po
- AIT-Languages plugin – ./wp-content/plugins/ait-languages/ait/languages/ait-languages/ait-languages-LanguageCode.po
- AIT-Shortcodes plugin – ./wp-content/plugins/ait-languages/ait/languages/ait-shortcodes/ait-shortcodes-LanguageCode.po
- AIT-Toolkit plugin – ./wp-content/plugins/ait-languages/ait/languages/ait-toolkit/ait-toolkit-LanguageCode.po
- Revolution Slider plugin – ./wp-content/plugins/ait-languages/ait/languages/revslider/revslider-LanguageCode.po
- other AIT Plugins – ./wp-content/plugins/ait-languages/ait/languages/ait-Plugin-Code-Name/ait-Plugin-Code-Name-LanguageCode.po
Themes and plugins include also default English translation files what will allow you change default English words too.
How to edit po translation files
To translate .po files we recommend poEdit translation tool. It’s free software which will allows you open .po file, change wanted words and save .mo file which is loaded by WordPress.
After installation, go to preferences of Poedit via menu File > Preferences and in Editor tab of options select “Automatically compile .mo file on save” to automatically create .mo file during saving .po file.
Let’s say you are not happy with text “Nothing Found” words which appear in empty search results page. Select Edit a translation because you are going to edit existing translation.
- so you are going to change default English words which appear on the frontend of website, therefore in poEdit tool open file ./wp-content/plugins/ait-languages/ait/languages/ait-theme/en_US.po
- poEdit display all words included in this file, you can search for text to change from menu Edit > Find
- click on wanted text and look into bottom of poEdit window, you will see displayed Source text section and also Translation section what is the place where you have to write your changed sentence or word
- after change click on save, .po file with change will be saved and also will be automatically resaved .mo file which is necessary for WordPress
- your website now display another words or sentences instead of default text in file, without any necessary modification of text inside theme/plugin codes
If you are going to edit po file and change translations over FTP, download po file to your computer and edit file locally, because generated mo file is not uploaded to your server automatically with saved po file!