• Resolved DanielAGW

    (@danielagw)


    Hi,
    Thanks for the plugin.
    I get two notices on plugin page (in About box):

    Notice: Use of undefined constant WPLANG - assumed 'WPLANG' in /opt/lampp/.../wp-content/plugins/wp-sitemap-page/settings.php on line 420

    Notice: Use of undefined constant WPLANG - assumed 'WPLANG' in /opt/lampp/.../wp-content/plugins/wp-sitemap-page/settings.php on line 429

    I checked the code and it seems to be right, I can’t see WPLANG const declared anywhere.

    I am using WP_DEBUG mode.

    Cheers,
    Daniel

    https://wordpress.org/plugins/wp-sitemap-page/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Tony Archambeau

    (@funnycat)

    Hi,
    The PHP constant WPLANG should be used in the wp-config.php file, on the root of the WordPress directory. Have a look on the wp-config-sample.php file, you will notice there is such a constant.
    Add this line on your wp-config.php file :
    define('WPLANG', '');
    or
    define('WPLANG', 'en_GB');

    Thanks for your message.
    Sincerely,
    Tony

    Thread Starter DanielAGW

    (@danielagw)

    Thanks for the answer.
    Turns out WPLANG is now deprecated (since 4.0). You may still have it if you had your first install prior to 4.0, but WPLANG is no longer there since 4.0 (neither in wp-config-sample.php nor in wp-config.php).

    Here is some info on this change – https://core.trac.wordpress.org/changeset/29630. It is recommended to use get_option('WPLANG') instead.

    Here is a thread about it on Support forum – https://wordpress.org/support/topic/broken-wplang-_e-functions-not-selecting-good-language.

    Cheers,
    Dan

    Plugin Author Tony Archambeau

    (@funnycat)

    Thanks a lot for your information. I never noticed this change.
    Thanks a again for your feedback.
    I will fix this in a next release.

    Have a nice day.
    Sincerely,
    Tony

    Thread Starter DanielAGW

    (@danielagw)

    Great, thank you so much for quick answers. Good luck with your plugins!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Notice: Use of undefined constant WPLANG’ is closed to new replies.