I have a theme which loads .po and .mo files to display strings in English. I want to have only one language (Polish), but those two files are en_US. I tried replacing content in the en_US.po file but nothing changed on the website, I do not know why. Where does it store strings if changing .po files changes nothing?
There are already an
en_US.po file in the theme you are using. You can simply make a copy of that file and rename it as
pl_PL.po. You can now open the
pl_PL.po template with poedit, do all your translations in there, and just save it. Poedit will automatically create a
No need to go through all the pt. Just remember, as previously stated, change the language in the
Hi to translate your website you can do the following:
- Define your language in
- Then generate a po file for your theme with e.g this service: iCanLocalize Scanner
- Then your po and mo files should be named
pl_PL.moand put into a folder called languages or lang or something like this in your theme.
- if not, create a folder for languages and then use load_theme_textdomain (or
load_child_theme_textdomainif it's a child theme)
- If there's already a language folder with po and mo files just put your new files in the same folder.
With this you should be able to easily translate your site.
EDIT: if there's a pot file in your theme folder use it directly to generate po and mo files.