Okay
  Public Ticket #3782972
Translation
Closed

Comments

  • Margrethe started the conversation

    I have trouble locating the strings for the Salient Visual composer element that shows portfolio elements using  the Post Loop Builder. In the filter bar on top, it says "All" , it should be translated to "Alle".

    Same on bottom, there is a button for "Load More", should be translated to "Last flere".

    I've tried updating the Salient theme language files, the salient portfoilo plugin language files and even the plugin js_composer_salient but none of them changes these strings.  Where can I find the strings? (Adding a string replace in functions.php is a workaround, but not a good solution, I think)  

  •  8,936
    Tahir replied

    Hey Again,

    You will have to translate the "Sailent Core" plugin to translate those texts: 7261840507.png

    Best,

     


    ThemeNectar Support Team 

  • Margrethe replied

    Doesn't work. Created a Norwegian translation from the salient-core.pot, replaced Load More", but nothing happens.



    Attached files:  salient-core.png
      Skjermbilde 2024-12-13 kl. 12.45.56.png

  •  8,936
    Tahir replied

    Seems like a configuration issue with Loco Translate as the Sync feature is disabled: 2396962239.png 

    Please check the plugin settings and let us know. 

    Best 


    ThemeNectar Support Team 

  • Margrethe replied

    That did work, thank you! I initially created the Norwegian translation from salient-core.pot. 
    Deleted those files and created it from Loco instead. 

    Can I moove the .po and .mo to be in my Child theme folder so I have a finished translation when setting up a new site?

  •  8,936
    Tahir replied

    Yes, you can move it though you will have to add this code to force load the Child Theme .mo file:9615190572.pngClick on Image to View Larger

    add_action('after_setup_theme', function () {
        $locale = determine_locale(); // Automatically fetch the site's locale
        $mofile = get_stylesheet_directory() . "/lang/$locale.mo";
    
        if (file_exists($mofile)) {
            load_textdomain('salient', $mofile);
        } else {
            error_log("Child theme MO file not found: $mofile");
        }
    }, 20); // Load after parent theme

    Best,


    ThemeNectar Support Team 

  • Margrethe replied

    But that's just for the main salient language files created from nectar_salient_strings.pot, not the Core plugin, right?
    Added the script to functions.php and moved salient-core-nb_NO.mo +.po my child theme's /lang folder, but then i loose he translation again.

    Wow do I change path for the salient core plugin? 


    Attached files:  Skjermbilde 2024-12-13 kl. 13.38.22.png
      Skjermbilde 2024-12-13 kl. 13.39.33.png

  •  8,936
    Tahir replied

    Hey Again,

    This should help place the files correctly so they dont get overwritten:  https://docs.wpvip.com/wordpress-skeleton/languages-directory/#:~:text=Plugin%20and%20theme%20translations,-Top%20%E2%86%91&text=Internationalized%20plugins%20expect%20to%20find,located%20in%20languages%2Fthemes%2F%20.

    Best,

     


    ThemeNectar Support Team