Support » Theme: Unique » Translation (po/mo) and loop-nav.php

  • Resolved lic-8008


    Hi, fantastic theme! I just love it, clean and workable, great work.

    I am working on an Italian site, so I need it translated. I have mo/po files and everything is fine… EXCEPT for the loop nav ‘Previous’ & ‘Next’ posts.
    I checked the translations, and it’s all there. But in the loop nav it still showed ‘Previous’ in English.
    I found the .php for this: loop-nav.php, translated it there, and now it’s OK.

    But shouldn’t it be handled by the language files instead?
    I’m worrying about updates changing that php file…
    My ‘new’ loop-nav.php is in the child theme, won’t be overwritten, but what about the rest of the coding in that file? I just took the entire file and uploaded it in my child theme, after translating the 2 words.

Viewing 6 replies - 1 through 6 (of 6 total)
  • 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?


    Thank you for the reply. My languages folder originally contained

    • 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.po
    • 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?
    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.



    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.


Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Translation (po/mo) and loop-nav.php’ is closed to new replies.