• I am modifying a plugin, one of the (more time consuming) changes I did was internationalization with a local plugin translation loaded by load_plugin_textdomain, all seem to work on my hebrew blog, but when I tried it on a clean english blog it started to get errors from wpl10n.
    it seems that the function I used depends on WPLANG being defined.
    I`d like everything to work in english even if its not defined.
    in other works, I want english fallback for users that does not have WPLANG defined.
    how can I do that?

    Thanks,
    Omry.

Viewing 1 replies (of 1 total)
  • Thread Starter omry

    (@omry)

    I figured it out.
    simply loading the local translation file only if WPLANG is defined seems to solve the problem.
    this prevents the startup errors, and the original strings in the __(”) are shown.

    // load i18n file
    if (defined(‘WPLANG’) && ” != WPLANG)
    {
    load_plugin_textdomain(‘counterize’,’wp-content/plugins/counterize’);
    }

Viewing 1 replies (of 1 total)

The topic ‘i18n plugin without WPLANG’ is closed to new replies.