Wsparcie » Wtyczki » How to set default plugin language, when translation is missing

  • Hi,
    I’m wiriting a WordPress plugin. I want to ask, how can I change plugin’s source code to fix this problem:

    The WP site is using for example french as a default main language.

    My plugin has translations for other different languages

    So, when site doesn’t see french translations, it display all strings in my plugin as key words.

    So I would like to set my plugin’s default translation/language which will be used when wordpress won’t find the proper translation.

    For example:
    1) site in en_GB and my plugin has en-GB file – everything’s ok
    2) site in fr_FR and my plugin does’t have this translation – strings are displayed as variables’ names/key words
    So i want to set my plugin to show for example en_GB when french translation doesn’t exist

    For translatons I’m using i18n

    • This topic was modified 3 years, 1 months temu by magnes1507.
    • This topic was modified 3 years, 1 months temu by magnes1507.
  • Temat ‘How to set default plugin language, when translation is missing’ jest zamknięty na nowe odpowiedzi.