How can i translate slides and mobile panel via wpml

This topic has 7 replies, 3 voices, and was last updated 4 months ago ago by Andrew Mitchell

  • Avatar: yaci
    yaci
    Participant
    July 16, 2024 at 18:47

    how can I translate slides and mobile panel via wpml?

    6 Answers
    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    July 17, 2024 at 09:38

    Hello,

    Thank you for reaching out to us with your query.

    Please provide wp-admin and FTP access + desired translation strings for the mobile panel.

    For FTP access, we require the following details: FTP host, FTP username, FTP password, FTP port, and FTP encryption type. If you need assistance in creating these credentials, please reach out to your hosting provider who will guide you through the process.

    Best Regards,
    8Theme’s Team

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    July 17, 2024 at 09:41

    Hello @yaci,

    We hope this message finds you well.

    We kindly request that you review the following article regarding the translation of slides using WPML: https://www.8theme.com/documentation/xstore/theme-translation/translation-with-wpml/ Please ensure that the translation approach for slides is consistent with that of static blocks.

    Thank you for your attention to this matter.

    Best Regards,
    8Theme’s Team

    Avatar: yaci
    yaci
    Participant
    July 17, 2024 at 10:58

    hello
    this is ftp and admin access .
    for desired translation strings for the mobile panel I want to translate all choices titles as I mark on the screenshot

    should I provide you the translation for each title or you will add an option to translate it via admin panel?

    Please contact administrator
    for this information.
    Files is visible for topic creator and
    support staff only.
    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    July 17, 2024 at 12:45

    Hello, yaci,

    Thank you for providing the access details. Unfortunately, the mobile panel can only be translated using custom code in the child theme. Therefore, we kindly request you to send us the translations for the terms used in the mobile panel.

    Best Regards,
    8Theme’s Team

    Avatar: yaci
    yaci
    Participant
    July 17, 2024 at 12:52

    Translation terms
    1/ boutique (french)
    Shop (english)
    المتجر (arabic)

    2/catégories (french)
    Categories (English)
    الفئات (arabic)

    3/recherche(french)
    Search(English)
    البحث (arabic

    4/contact(french)
    Contact(English)
    تواصل معنا (arabic)

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    July 18, 2024 at 07:22

    Hello, yaci,

    We hope this message finds you well. We are pleased to inform you that we have translated the mobile panel. To facilitate this update, we have added the following code to the functions.php file of your child theme.

    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 'ar': 
    					$current_mod = array(
    					  array(
    					    "element" => "custom",
    					    "icon" => "et_icon-shop",
    					    "icon_custom" => "",
    					    "text" => "المتجر ",
    					    "is_active" => false,
    					    "link" => "20",
    					    "custom_link" => ""
    					  ),
    					  array(
    					    "element" => "custom",
    					    "icon" => "et_icon-dev-menu",
    					    "icon_custom" => "",
    					    "link" => "3978",
    					    "custom_link" => "",
    					    "text" => "الفئات ",
    					    "is_active" => false
    					  ),
    					  array(
    					    "element" => "search",
    					    "icon" => "et_icon-zoom",
    					    "icon_custom" => "",
    					    "link" => "36",
    					    "custom_link" => "",
    					    "text" => "البحث ",
    					    "is_active" => false
    					  ),
    					  array(
    					    "element" => "custom",
    					    "icon" => "et_icon-conversation",
    					    "icon_custom" => "",
    					    "link" => "36",
    					    "custom_link" => "",
    					    "text" => "تواصل معنا",
    					    "is_active" => false
    					  )
    					);
    				break;
    
    				case 'en': 
    					$current_mod = array(
    					  array(
    					    "element" => "custom",
    					    "icon" => "et_icon-shop",
    					    "icon_custom" => "",
    					    "text" => "Shop",
    					    "is_active" => false,
    					    "link" => "20",
    					    "custom_link" => ""
    					  ),
    					  array(
    					    "element" => "custom",
    					    "icon" => "et_icon-dev-menu",
    					    "icon_custom" => "",
    					    "link" => "3978",
    					    "custom_link" => "",
    					    "text" => "Categories",
    					    "is_active" => false
    					  ),
    					  array(
    					    "element" => "search",
    					    "icon" => "et_icon-zoom",
    					    "icon_custom" => "",
    					    "link" => "36",
    					    "custom_link" => "",
    					    "text" => "Search",
    					    "is_active" => false
    					  ),
    					  array(
    					    "element" => "custom",
    					    "icon" => "et_icon-conversation",
    					    "icon_custom" => "",
    					    "link" => "36",
    					    "custom_link" => "",
    					    "text" => "Contact",
    					    "is_active" => false
    					  )
    					);
    					break;
    
    					case 'fr': 
    						$current_mod = array(
    						  array(
    						    "element" => "custom",
    						    "icon" => "et_icon-shop",
    						    "icon_custom" => "",
    						    "text" => "Boutique",
    						    "is_active" => false,
    						    "link" => "20",
    						    "custom_link" => ""
    						  ),
    						  array(
    						    "element" => "custom",
    						    "icon" => "et_icon-dev-menu",
    						    "icon_custom" => "",
    						    "link" => "3978",
    						    "custom_link" => "",
    						    "text" => "Catégories",
    						    "is_active" => false
    						  ),
    						  array(
    						    "element" => "search",
    						    "icon" => "et_icon-zoom",
    						    "icon_custom" => "",
    						    "link" => "36",
    						    "custom_link" => "",
    						    "text" => "Recherche",
    						    "is_active" => false
    						  ),
    						  array(
    						    "element" => "custom",
    						    "icon" => "et_icon-conversation",
    						    "icon_custom" => "",
    						    "link" => "36",
    						    "custom_link" => "",
    						    "text" => "Contact",
    						    "is_active" => false
    						  )
    						);
    					break;
    				
    				default:
    					break;
    			}
    			
    		}
    		return $current_mod;
    	} );
    });

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

    Best Regards,
    The 8Theme Team

  • Viewing 7 results - 1 through 7 (of 7 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.