Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #985764

    Hi there!
    I’m working on a site that is in portuguese (pt-br) and I’m using child theme.
    I followed the instructions on https://kriesi.at/documentation/enfold/translation/ about how to make Enfold read the language files in a child theme, but I’m still having problems.
    I’d tried using this function that I saw in https://kriesi.at/support/topic/theme-update-and-child-theme/#post-140430:

    add_action('after_setup_theme', 'avia_lang_setup');
    function avia_lang_setup()
    {
    $lang = get_stylesheet_directory()  . '/lang';<br />
    load_child_theme_textdomain('avia_framework', $lang);
    }

    … and it didn’t worked also.

    If you go to my site and try to search something like “asdfasdasdas”, forcing to not find anything, the message is still in english. The same thing on the search page results.

    I did the translation using POEDIT and I have put both files (.PO and .MO) in to enfold-child/lang.

    What I’m doing wrong? :(

    Thanks for helping!

    Regards!

    #985868

    Hey emaruxo,

    Thank you for using Enfold.

    You can use this plugin to translate the strings or texts.

    // https://wordpress.org/plugins/loco-translate/

    The language file (.po) may not contain the updated lines so manual translation may not work properly.

    Best regards,
    Ismael

    #985906

    and by the way – what should a linebreak in a code-block do?
    this is the code for the path to your child-theme/lang folder to activate for child lang files

    
    function language_file_child_theme() {
        $lang = get_stylesheet_directory().'/lang';
        return $lang;
    }
    add_filter('ava_theme_textdomain_path', 'language_file_child_theme');

    do not forget to empty all cache you use (browser cache, enfold merged files, other plugins)

    #987175

    Thanks for helping Ismael and Guenni.
    The Loco Translate plugin worked very well.
    Regards!

    #987362

    Hi,

    Awesome! Glad we could help!

    Please take a moment to review our theme and show your support https://themeforest.net/downloads
    Don’t forget to bookmark Enfold Documentation for future reference.

    Thank you for using Enfold :)

    Best regards,
    Ismael

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Translation – Child Theme’ is closed to new replies.