Support » Plugin: Polylang » Dutch .mo and .po files

  • Resolved unicaz

    (@unicaz)


    Hello,
    I don’t find the .mo and .po ducth files in the new version of Polylang and my theme is in 3 different languages and one of them is Dutch (Netherlands). Although I modified code to change some strings that I couldn’t see in Polyland due to my theme, everything works fine in Spanish and English but this strings was missed since I uptodated to the last Polylang version. My website where you can check my problem is: http://www.longletsbenidorm.es. I hope somebody can help me a.s.a.p. Kind regards.

    https://wordpress.org/plugins/polylang/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Chouby

    (@chouby)

    Hi!

    Dutch translations should now be automatically updated from translate.wordpress.org. Check in your dashboard if you don’t have updates available for translations.

    Thread Starter unicaz

    (@unicaz)

    Hello!
    No, I have no updates waiting to be installed. I have a file in WordPress called “Languages” and inside I have English, Spanish and Nederlands but I didn’t see .po and .mo files in the Polylang’s plugin file called “Languages” so that’s why I think the problem will be solved if somebody cal provide me the .mo and .po docs and I will install them (polylang-nl_NL.mo and polylang-nl_NL.po) into the file “languages” in Polylang’s plugin. Kind regards.

    Plugin Support Chrystl

    (@chrystl)

    Hi
    @unicaz
    I reproduced your issue. You can upload them here: https://translate.wordpress.org/projects/wp-plugins/polylang/stable/nl/default

    At the end of this page select “Export: all current” as “Portable object message catalog(.po/.pot)”. Then do the same for “Machine object message catalog(.mo).”

    Rename them polylang-nl_NL.mo and polylang-nl_NL.po

    Plugin Support Chrystl

    (@chrystl)

    Just a precision: put your files in wp-content/languages/plugins.

    Thread Starter unicaz

    (@unicaz)

    Hello,

    Thanks for your efforts but nothing happened! I did what you told me. I downloaded the files and change the name like you told me and uploaded them to my wordpress file wp-content/languages/plugins but still all my Dutch translations are missed.
    You can check it by yourself visiting the web: http://www.longletsbenidorm.es
    Kind regards.

    Plugin Support Chrystl

    (@chrystl)

    Sorry we didn’t speak about the same thing. In fact polylang-nl_NL.mo and polylang-nl_NL.po are the translation files for your Polylang admin.

    Which are the untranslted strings? Could give some examples?

    Thread Starter unicaz

    (@unicaz)

    Yes, of course!!

    When you visit our homepage, if you do it en English or Spanish you find a very short welcome message: WELCOME! in English; BIENVENID@S!in Spanish but nothing appears when you see the homepage in Dutch. I use this code to manually translate the strings that I can’t translate using polyland due to the theme I’m using:

    <?php $currentlang = get_bloginfo(‘language’);
    if($currentlang==”es-ES”):?>
    <h1>!BIENVENID@S¡</H1>
    <?php else: ?>

    <?php $currentlang = get_bloginfo(‘language’);
    if($currentlang==”nl-NL”):?>
    <h1>WELKOM!</H1>
    <?php else: ?>

    <?php $currentlang = get_bloginfo(‘language’);
    if($currentlang==”en-GB”):?>
    <h1>WELCOME!</H1>

    <?php endif; ?>
    <?php endif; ?>
    <?php endif; ?>

    Plugin Support Chrystl

    (@chrystl)

    You can use the pll_register_string in your functions.php to create your strings in the Strings translations option.

    An example which will work with your 3 languages:

    <?php
    if(function_exists('pll_register_string')){
    	pll_register_string('custom header text', 'my header text', 'my_header');
    }
    ?>

    Then you need to use pll_e (for your case certainly in the header.php) to display them on the front.

    <?php
    pll_e('my header text');
    ?>
    Thread Starter unicaz

    (@unicaz)

    Hi there!!

    Thank you so much for your ideas but finally I fixed the problem doing something very simple, for me:

    I added a new language in Polylang (I added French but this really doesn’t matter) and I change the name into Nederlands and the flag also.

    Later I change all my code with “nl-NL” into “fr-FR” and all my listings, posts and pages into the new (fake)Nederlands language and it works!!! You can check it on my site: http://www.longletsbenidorm.es

    I’m sooooo happy!!

    This topic can be closed and thank you again for your attention.

    Kind regards,

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Dutch .mo and .po files’ is closed to new replies.