• Resolved hardesfred

    (@hardesfred)


    Why don’t you use load_plugin_textdomain() instead of making your own translation loader ?
    I know there’s no real convention for where the translation files should be stored, but judging from WordPress source code, the right location should be
    wp-content/languages/plugins/{textdomain}-{locale}.mo
    and not what you did ; which is
    wp-content/languages/{textdomain}/{textdomain}-{locale}.mo

    https://ww.wp.xz.cn/plugins/theme-my-login/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jeff Farthing

    (@jfarthing84)

    Because, at the time, that’s the route I chose to go. I believe because it would be more organized than having many different translations of many different plugins all within one directory.

    Thread Starter hardesfred

    (@hardesfred)

    Fair enough. And thanks the fast reply.
    That said, I’d suggest you mention this path (wp-content/languages/theme-my-login/theme-my-login-{locale}.mo) in the FAQ or somewhere else. It could help other people who didn’t understand, like me, why their translation files weren’t loaded.

    Cheers

    Hi there, could you please let me know where should I add this code?

    ________________________________________________________________________
    wp-content/languages/theme-my-login/theme-my-login-{pt_BR}.mo

    or

    load_plugin_textdomain()
    __________________________________________________________________________
    thanks a lot and all the best,

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Translation loading’ is closed to new replies.