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.
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
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.
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; ?>
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,