Hi Linda.
Somehow the translated file I wrote, is not loading. Can you help me with how to get the translated file to load?
Thanks in advance.
hi cybrjim,
the translations must be in the ‘languages’ folder. My Unique theme has one (translations of the theme Unique).
Since I have a child-theme I have loaded the ‘languages’ folder there. In my child-theme files don’t get overwritten during theme updates.
does that help?
Hi.
Thank you for the reply. My languages folder originally contained
- unique-en_EN.mo
- unique-en_EN.po
I started translating it to Hungarian with poedit, altough the translation is partial I guess it should load anyways. So now I have the following files in my languages folder
- unique-en_EN.mo
- unique-en_EN.po
- unique-hu_HU.mo
- unique-hu_HU.po
But the translation, is not loading because strings I’ve translated, remain unchanged. Each file has chmod 644 on them, so they are readable.
Do I need to change something in the PHP code? Or do I have to rename the files to something else?
I am not an expert, but..
first thing: did you change the language in config.php?
example:
define(‘WPLANG’, ‘hu_HU’);
then: did you check in poedit that ‘a new translation’ was created (ie: Hungarian) ?
I have noticed that the procedure is different when creating a new translation, as opposed to just editing an existing. Check the poedit help files etc.
In case, also put the languages in the original Unique theme (I have done so, just in case)
So you’d have a languages folder in the unique theme with the Hungarian files AND a ‘same’ languages folder in the child-theme also.
In my case, I actually had to take the loop-nav.php file and manually translate ‘Previous’ and ‘Next’ there. Only them did it come out right.
That shouldn’t have to be, but nevertheless, it finally worked.
The other translations went through fine, though.
Check config.php + if your Hungarian file is ‘ok’ and seen as a valid translation.
Linda
Hi.
Got it working. Somehow poedit didn’t change the line “Language: us_US\n” to “Language: hu_HU\n”. No wonder that my translation didn’t load. Thank you for pointing me in the right direction.