Problem with Translation with mobile panel: Does not work in Greek

This topic has 4 replies, 2 voices, and was last updated 1 weeks ago ago by Andrew Mitchell

  • Avatar: Stratos Lightform
    Stratos Lightform
    Participant
    September 11, 2024 at 11:49

    Hello
    We activated the mobile panel which work on the english version of the website but not on the greek version.

    The greek version shows the icons but if you tap or click on them nothing happens.

    We have
    Deactivated CDN and WP Rocket
    Removed and Added the icons again
    Translated the text fir the icons from loco Translate ( after we synced them ) and also through String Translation via WPML
    Cleared the browser cache

    The problem still remains, and it appeared after we did the translations. Before the translations everything worked but the test at the Greek mobile panel was in English.

    We have also updated all plugins to the latest versions

    Can you please assist?
    Kind Regards
    Stratos A

    Content is visible for topic creator and
    support staff only.
    3 Answers
    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    September 12, 2024 at 16:56

    Hello, Stratos Lightform,

    Thank you for reaching out to us. We are pleased to inform you that we have successfully completed the translation of the mobile panel. To achieve this, we created a snippet titled “XStore Translate Mobile Panel” using the Code Snippets plugin already available in your system.

    We have added the following code to implement this feature:

    // XStore translate mobile panel
    
    add_action('init', function(){
    	add_filter( "theme_mod_mobile_panel_package_et-mobile", function($current_mod){
    		if (defined( 'ICL_LANGUAGE_CODE' )){
    
    			// Use case to modify sections for different languages
    			switch (ICL_LANGUAGE_CODE) {
    				case 'el': // el - current language code
    					$current_mod = array(
    					    array(
    					        'element' => 'cart',
    					        'icon' => 'et_icon-shopping-bag',
    					        'icon_custom' => '',
    					        'text' => 'καροτσάκι',
    					        'is_active' => '',
    					        'link' => '6',
    					        'custom_link' => ''
    					    ),
    					    array(
    					        'element' => 'shop',
    					        'icon' => 'et_icon-shop',
    					        'icon_custom' => '',
    					        'text' => 'κατάστημα',
    					        'is_active' => '',
    					        'link' => '',
    					        'custom_link' => ''
    					    ),
    
    					);
    					break;;
    				default:
    					// code...
    					break;
    			}
    			
    		}
    		return $current_mod;
    	} );
    });

    Ideally, this code should be added to a child theme. However, we noticed that you are not currently using one. We strongly recommend considering the use of a child theme to enhance the functionality and maintainability of your website.

    Should you have any further questions or require additional assistance, please do not hesitate to contact us.

    Best Regards,

    The 8Theme Team

    Avatar: Stratos Lightform
    Stratos Lightform
    Participant
    September 13, 2024 at 09:58

    Hello.

    The panel works but the greek cart icon redirects to the ENGLISH cart not the GREEK one.

    Can you please fix this as well?

    Thanks

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    September 13, 2024 at 15:53

    Hello, Stratos Lightform,

    We hope this message finds you well. We are pleased to inform you that the error has been successfully corrected. Kindly verify the changes at your earliest convenience.

    Best Regards,

    The 8Theme Team

  • Viewing 4 results - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.Log in/Sign up

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.