• Resolved Yavor Spassov

    (@ygspasov)


    I’ve added a Bulgarian translation for the theme in the languages directory. Will it be overwritten on future updates? I also tried to add it to the child theme I’ve made on GeneratePress but it doesn’t work from the child theme’s directory so I’m keeping the file inside the parent theme’s languages folder.

    Second question: How can I send you the translation?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Yavor Spassov

    (@ygspasov)

    Is there a way to load the bg_BG.po file from the child theme and not from the parent?

    Theme Author Tom

    (@edge22)

    Hi there,

    You can load translations in a child theme using the example function on this page: https://codex.www.ads-software.com/Function_Reference/load_child_theme_textdomain

    That being said, I would love to include it in the parent theme! If you’re willing, you can send it to [email protected].

    Thanks!! ??

    Thread Starter Yavor Spassov

    (@ygspasov)

    Hi Tom,

    I’ve placed the following function into the child theme’s function.php file:

    add_action( 'after_setup_theme', 'my_child_theme_setup' );
    function my_child_theme_setup() {
        load_child_theme_textdomain( 'generatepress-child', get_stylesheet_directory() . '/languages' );
    }

    However, the translation files only load from the parent theme and not from the child. What could be the cause? I have the files bg_BG.mo and bg_BG.po into the child theme’s languages folder.

    Thread Starter Yavor Spassov

    (@ygspasov)

    I just sent the files to [email protected].

    Theme Author Tom

    (@edge22)

    Instead of generatepress-child as the text domain, just use generate.

    Thanks for sending the translation! ??

    Thread Starter Yavor Spassov

    (@ygspasov)

    Thank you. It works now. The translation loads from the child theme. Now the entire WordPress community will be envious that only I have a Bulgarian translation for your theme. ??

    Thread Starter Yavor Spassov

    (@ygspasov)

    I just examined your funcions.php file. In fact you use “generate” instead of “generatepress” as textdomain.

    Theme Author Tom

    (@edge22)

    I use “generate” throughout the theme as the prefix to all functions, and the text domain. It’s just a bit shorter than generatepress ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Bulgarian translation’ is closed to new replies.