Common problems on strings translations

Many users find some difficulties to translate the strings of the theme and the plugins used and believe that these problems are due to the theme. Any wordpress template doesn’t modify the wordpress native translation system which, as written in the official documentation, must be executed by translating all the strings of the theme translation files or the plugin with the .pot extension.

The string translation procedure is very simple, here the documentation, which I summarize in:
– creation of the .po and .mo translation files from your file.pot in your language
– insertion of the 2 files in the languages ​​folder of the theme and of the plugins

You have created the translation files and your strings have not been translated means that you have made some mistakes and below you can find the most frequent errors.

External plugins used

Very often some users use external plugins for string translation (qtranslate, WPML, locotranslate, polylang etc.), these plugins automatically create “languages” folders inside wordpress preventing native wordpress translation. If you want to translate strings with plugins and encounter problems, contact the author of the plugin to solve the problem. If you want to translate the strings with the default mode of wordpress my advice is to remove all plugins, this operation may be useless since some plugins create the folder “languages” but, at the time of removing the plugin, the folder is not removed. In this case the folder removals must be done manually via FTP (contact the server or the author of the plugin for this).

Theme and plugins are not both translated

To translate all the strings of the theme it is necessary to translate the strings of the theme and of all the plugins used. (example: nd-travel and nd-shortcodes)

Incorrect language code

Pay attention to the language code of your version of wordpress which must be the same as the language code of your translations. For example, the Brazilian wordpress installation has the extension pt_BR which is different from the Portuguese language which is pt_PT

Pot not updated

Translate all the strings starting from the latest version of the .pot file. If you translate the strings of version 1 of the plugin and over time the plugin is updated several times, many strings will be added and will not be present in your translation file. In this case you have to update the strings from your translation file and generate the .mo file again

Wrong folder

Remember that the translation files must be inserted in the languages ​​folder of the theme and each plugins

Missing some files

For the correct translation of the strings, make sure that both .po and .mo files are present in the languages folder

Incorrect name of the translation files

Remember that the name of the translation file varies depending if is a theme or a plugin.

Categories :

Can't find what you're looking for ? Ask our support team.

© Nicdark Agency