• I have a problem with the translation. I did a translation using poedit and put the files in the folder “lang”. Nothing happens, theme still displays in English. What am I doing incorrectly?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Same thing happened to me! Impossible to load the mo file!

    I tried to translate the theme too. Uploaded the .po en .mo files to ‘lang’folder but the website is still in English. What am I doing wrong?

    lutin2706

    (@severinebertholet-ferretnet)

    Did anybody solve this issue ?

    When using “Codestyling Localization”, Textdomain is set to “option-tree”, instead of “jeg_textdomain” as described in full theme documentation

    Should I translate everything by hand in each file ?

    lutin2706

    (@severinebertholet-ferretnet)

    OK, I found the issue.

    The template is gettext ready, but some elements are missing. To solve this, you have to :

    • Add this to style.css :
    • Text Domain: jkreativ-lite
      	Domain Path: /lang
    • Add this to init.php :
    • /**
      * Load text domain for translation
      */
      
      function jkreativ_lite_load_theme_textdomain() {
      	load_theme_textdomain( 'jkreativ-lite', get_template_directory() . '/lang' );
      }
      add_action( 'after_setup_theme', 'jkreativ_lite_load_theme_textdomain' );
    • Add your translation to jkreativ-lite/lang folder (.mo and .po files). This can be generated by Poedit, Codestyling Localization plugin, or anything else.

    That’s it ! This should work (it works for me).

    Thanx! I’ll try it soon.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Problem with the translation’ is closed to new replies.