Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #766547

    Where should I put translation files?
    I use Endold Child.

    Thank you

    #766565

    Hey MORTULGAAH,

    This link should help you: https://wpexplorer-themes.com/total/docs/child-theme-translation-files/

    Best regards,
    John Torvik

    #766586

    Thank you. Also – where should I upload translated files for the normal theme?

    Do I just copy file somewhere, or I should also change some code? (I have translated file with poedit.)

    #766884

    Hi,

    Now, you need to use an translate plugin to upload this file like the WPML or the LocoTranslate.

    Ref: https://localise.biz/wordpress/plugin/beginners

    Best regards,
    John Torvik

    #766896

    i allways use poedit and it works great – do not forget to mark that setting (sorry on my german Wp i only see:) “MO Datei beim Speichern automatisch erstellen” should be something like that: “Allways create a MO file automatically when saving” And do upload both files
    On Enfold if you use a Child-Theme you can use this in functions.php of child theme :
    and than put in your lang files in the folder Enfold-Child/lang (Same structure as in parent theme ) (i found this from Ismael9

    add_action('after_setup_theme', 'avia_child_lang_setup');
    function avia_child_lang_setup() {
    	remove_action('after_setup_theme', 'avia_lang_setup');
    	$lang = get_stylesheet_directory() . '/lang';
    	load_theme_textdomain('avia_framework', $lang);
    }

    i used this code:

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

    But : i now have to proove it if it will work – because sinse Update to Enfold 4.0.3 i have a lot of troubles with those codes replacing Original Files in Enfold Parent Theme. (php shortcodes and javascript files) see here: Link

    • This reply was modified 7 years ago by Guenni007.
    #767943

    Hi,


    @MORTULGAAH
    : Please create a backup of the language files that you need before updating the theme and if you’re using a child theme, just follow @Guenni007’s suggestion. \

    UPDATE: https://kriesi.at/support/topic/enfold-4-0-3-a-bit-buggy/#post-767934

    Best regards,
    Ismael

    #767987

    yes please – use this new snippet:

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

    Hi,


    @Guenni007
    Thanks for your help! :)

    Best regards,
    Yigit

    #768982

    Ok, but where to put translation files and how to name them for Croatian language for them to work in main theme?

    Thanks

    #769007

    Hi!

    Here are the language names according to WordPress
    https://codex.wordpress.org/Codex:Multilingual

    Cheers!
    Basilis

    #769012

    I think I found a bug in Enfold. The theme didn’t want to switch to Croatian language until I have deleted all other languages.

    #769228

    Hey!

    Did you set the Settings > General > Site Language properly? Please post the login details here so that we can check it.

    Regards,
    Ismael

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.