Home Forums WoodMart support forum Translation issue

Translation issue

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

    tg
    Participant

    Hello!

    We’re having a translation issue on our site. I’ve created a translation file based on the provided .pot file via PoEdit and uploaded it to the Woodmart child theme. It is working on most pages but once I open a category page the menu text is back to english. From what I can see the div class name is the same for the main page and any category page:

    		<span class="menu-open-label">
    			<?php esc_html_e( 'Browse Categories', 'woodmart' ); ?>
    		</span>

    Could you please advise why the translation isn’t loaded on category pages?

    Thanks
    Stefan

    Attachments:
    You must be logged in to view attached files.
    #327020

    tg
    Participant

    Here are some more labels that aren’t translated:

    			<div class="wd-filter-buttons wd-action-btn wd-style-text wd-filter-icon<?php echo woodmart_get_old_classes( ' woodmart-filter-buttons' ); ?>">
    				<a href="#" rel="nofollow" class="open-filters"><?php esc_html_e( 'Filters', 'woodmart' ); ?></a>
    			</div>
    			<span class="per-page-title">
    				<?php esc_html_e( 'Show', 'woodmart' ); ?>
    			</span>
    
    #327025

    Hello,

    Thank you very much for choosing our theme and for contacting us.

    In order to translate the Woocommerce strings, you need to create a separate translation.

    We would recommend using the Loco plugin.

    You can translate/rewrite all theme and plugin texts via PO file in WordPress. Here is a video tutorial that should help you translate your website texts with a Loco Translate plugin https://www.youtube.com/watch?v=D3NsDdMzsls&list=PLMw6W4rAaOgKKv0oexGHzpWBg1imvrval&index=3

    Please check the video tutorial to see how to save the translation file correctly. You can remove the plugin and translations would remain. Also, translations would remain after each theme update.

    In order to translate the Woocommerce strings, you need to create a separate translation in Loco > Plugins > Woocommerce in the same way as shown in the video.

    Best Regards

    #327026

    tg
    Participant

    In order to translate the Woocommerce strings, you need to create a separate translation.

    As I wrote earlier, that’s exactly what I did via PoEdit. And the translations are working as they should on most pages but not on a category page.

    #327075

    Hello,

    As per your screen, you are trying to translate the contact form, in this case, you should create the translation for this plugin.

    Each theme, each plugin are translated separately.

    Best Regards

    #327173

    tg
    Participant

    Hello!

    The first screenshot was the wrong attachment (as I wrote in the change note during the edit). Please see the screenshots attached to this post.
    The first (startpage.png) shows the strings correctly translated.
    The second (categorypage.png) shows a category page where the strings are partially untranslated.

    As per the code posted above the classes and strings are the same for both pages and are translated in the .mo file.

    Attachments:
    You must be logged in to view attached files.
    #327192

    Hello,

    This string shows that these two strings are not translated, please synchronize the translation and try again.

    Best Regards

    #327195

    tg
    Participant

    Again: We’re not using Loco Translate – there is nothing to synchronize.
    And as you can clearly see on the start page the strings are properly translated.

    Additionally I’ve attached screenshot from the translation.

    Attachments:
    You must be logged in to view attached files.
    #327240

    Hello,

    Please contact the support of the plugin that you use for the traslation. We recommend using Loco as there is no problem provided the translation has been properly created and saved.

    WoodMart theem has all the files ready for the transaltion and for multilanguage site and the theme does not influence the performance of the translation plugins.

    Best Regards

    #327247

    tg
    Participant

    Hello,

    I get the feeling you don’t want to support what you sell. You’re not reading the information I provide and suggest “solutions” that don’t even apply to our issue.
    PoEdit is not a plugin but a tool for creating .po / .mo files. I’ve used it to translate every other webpage I created / support and never had any issues with the translations.
    The files are created correctly by PoEdit and working on the start page, contact page, other created pages. The issue only arises on category pages.

    But since you don’t see any other solutions but a third party plugin that does exactly the same:
    I’ve installed Loco translate and translated the problematic entries. Surprise: The exact same issue is present here as well.

    If anyone else runs into this issue, I got the solution for you. Add the following code to your woodmart-child/functions.php:

    function woodmart_lang_setup() {
    	$lang = get_stylesheet_directory() . '/languages';
    	load_child_theme_textdomain( 'woodmart', $lang );
    }
    add_action( 'after_setup_theme', 'woodmart_lang_setup' );
    

    This will load the language files properly from the child theme. I didn’t dig deeper though why the translations are loaded on some pages such as the start page but not on others.

    #327261

    Lokalfux
    Participant

    Hi,
    ich nutze die Software Notepad++, um keine unnötigen Plugins zu installieren…
    damit öffne ich die woodmart de_De Datei per ftp und bearbeite diese… abspeichern fertig…

    Gruß, Klaus

    #327404

    Hello tg,

    We are glad you have solved the issue. Just for your information, you should have translated the parent theme files not the child theme.

    If you have any questions please feel free to contact us.

    Best Regards

Viewing 12 posts - 1 through 12 (of 12 total)