Support » Plugin: OptionTree » Languages

  • Resolved Steekvlam


    How can I load different language using theme mode.

    Currently optiontree loads within the template folder /themes/mythemename/option-tree/
    But I can I load my language file thats named nl_NL.po /, located in the map /themes/mythemename/option-tree/languages/

    I tried to post it on github but I cant, I get a 404.

Viewing 3 replies - 1 through 3 (of 3 total)
  • To use localization in theme mode you have to create a folder:
    and put your *.mo files there.

    Secondly, you have to fix a small bug in OT itself:
    open the file ot-loader.php, and find the line that reads:
    define( 'OT_LANG_DIR', dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
    and replace it with:
    define( 'OT_LANG_DIR', '/' . dirname( plugin_basename( __FILE__ ) ) . '/languages/' );

    The reason for this is, the function “plugin_basename” trims any and all slashes (both leading and trailing) from the path and without the added slash OT_LANG_DIR can never be found.

    I’ve reported the issue on github:

    EDIT: typo, had 1 closing parentheses too many

    Its working fine!

    Plugin Author Derek Herman


    Version 2.2.0 is now out and should fix this issue.

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