• I’m struggling with the translation file. If i switch to standard Twentythirteen theme, the translation is on, if i switch to Blogsonry child theme, the translation is off.

    So I tried to place the “blogsonry-cs_CZ.mo” file into /wp-content/themes/blogsonry/languages/ as “blogsonry-cs_CZ.mo” but it also doesn’t work.

    Please can you advice the right method? I would prefer to have language files in blogsonry child theme, so they wouldn’t be overwritten when the parent twentythirteen theme is updated.

    Thank you!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi, I’ve finished translation of this theme to Czech. And in next 30 mins the transaltion will be generated. If it doesn’t hel try to add the functions.php file as described here.

    Thread Starter michalc

    (@michalc)

    Still doesn’t work. What I’ve done:

    a) placed the language files to /wp-content/themes/blogsonry/languages/

    b) placed

    function my_child_theme_locale() {
    load_child_theme_textdomain(‘blogsonry’, get_stylesheet_directory() . ‘/languages’);
    }
    add_action(‘after_setup_theme’, ‘my_child_theme_locale’);

    into functions.php in /wp-content/themes/blogsonry/

    c) placed
    define(‘WPLANG’, ‘cs_CZ’);
    into wp-config.php (and i have czech version of WP installed).

    What’s wrong?

    Translation works only if I place the language files to /wp-content/languages/.

    Did you checked for new translations? it sohuld be at address your /wp-admin/update-core.php
    Did you named the file like this? cs_CZ.mo (its described in CODEX)

    I’ve forgot that the latest version of WordPress prefere /wp-content/languages/ directory, so it might be useless.

    But when I was testing the new translation which was generated, everything worked well.

    • This reply was modified 7 years, 11 months ago by Tomas.
    Thread Starter michalc

    (@michalc)

    As I wrote in my first post, my language file is named “blogsonry-cs_CZ.mo”.
    As I wrote in my second post, it works, if I place language file to /wp-content/languages/.

    But it didn’t work if I place language file to /wp-content/themes/blogsonry/languages/ and

    function my_child_theme_locale() {
    load_child_theme_textdomain(‘blogsonry’, get_stylesheet_directory() . ‘/languages’);
    }
    add_action(‘after_setup_theme’, ‘my_child_theme_locale’);

    in functions.php in blogsonry folder.

    Did you tried to udpate Czech versions?

    Thread Starter michalc

    (@michalc)

    Sure. It’s not the matter of .mo version – it works even with the older one placed to /wp-content/languages/. Doesn’t work if i place it to /wp-content/themes/blogsonry/languages/.
    So I guess there is something wrong with the recommended

    function my_child_theme_locale() {
    load_child_theme_textdomain(‘blogsonry’, get_stylesheet_directory() . ‘/languages’);
    }
    add_action(‘after_setup_theme’, ‘my_child_theme_locale’);

    I thoght if you tried to check for updates in WordPress backend not just pushing new .mo file.

    The function might not be active as the wordpress translations have the highest priority.

    Thread Starter michalc

    (@michalc)

    That’s it! Thank you!

    u r welcome

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