Last modified by eMDPlugins Support - 2 years ago
805 Views
1 min read

How can I merge new translation strings from .pot file to .po file?

We update our products frequently adding new features. Each time, we add a new feature, the translation .pot files may get updated with new strings. If you see some of the strings not getting translated to your language and you translated all the strings you needed. It is possible that the translation file for your language is not up to date. In that case, it is time to merge new additions to your .po file and create a new .mo file. Here is the process, we use to update our own files:

  1. First make sure that gettext library is installed in your computer
  2. Run the following command from the console at the location where your .pot and .po files are: msgmerge -vU empd_pro-tr_TR.po empd_pro.pot
  3. Translate the new strings to your language using a text editor.
  4. Make sure to create a new .mo file after you finished using the following command: msgfmt -o empd_pro-tr_TR.mo empd_pro-tr_TR.po

If you're using a .po editor or translation software or service, search if there is a function available to update .po files from .pot files.

If you prefer a GUI based approach, we recommend Loco Translate WordPress plugin.

Was this information helpful?