• Resolved Ramzii

    (@ramzii)


    <?php
    	 $currentlang = get_bloginfo('language');
    	 if($currentlang=="nl-NL"):
    	?>
    
    // show some dutch content 
    
    	<?php else: ?>
    
    // show some english content 
    
    <?php endif; ?>

    This stopped working, all I see is the English content now.

    How come?

    Menu and pages that do not use this code are still functioning good.

    Am running 4.5.1. and 1.9. Thank you!

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • I have the same problem.

    Plugin Support Chrystl

    (@chrystl)

    Hi
    This not a Polylang issue. Since WordPress 4.5 the translators have choosen ‘nl’ instead ‘nl-NL’. You can see this change in the Dutch translation files, see nl_NL.po line 18 (msgstr "nl"):

    # Translation of 4.5.x in Dutch
    # This file is distributed under the same license as the 4.5.x package.
    msgid ""
    msgstr ""
    "PO-Revision-Date: 2016-05-02 15:16:51+0000\n"
    "MIME-Version: 1.0\n"
    "Content-Type: text/plain; charset=UTF-8\n"
    "Content-Transfer-Encoding: 8bit\n"
    "Plural-Forms: nplurals=2; plural=n != 1;\n"
    "X-Generator: GlotPress/2.1.0-alpha\n"
    "Project-Id-Version: 4.5.x\n"
    
    #. translators: Translate this to the correct language tag for your locale, see
    #. https://www.w3.org/International/articles/language-tags/ for reference. Do
    #. not translate into your own language.
    #: wp-includes/general-template.php:715
    msgid "html_lang_attribute"
    msgstr "nl"

    So you need to replace ‘nl-NL’ by ‘nl’.

    Thread Starter Ramzii

    (@ramzii)

    Wauw, thats solid! Thanks so much Chrystl for letting us know!

    If I may ask, how did you know? Was it broadcasted somewhere? I would like to keep in touch of such messages if possible!

    Thanks again this is solved! 😀

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP code stopped working’ is closed to new replies.