ocastaned Posted June 24, 2017 Share Posted June 24, 2017 I need some help translating Weebly and Symantec I just activated via WHMCS Marketconnect. During the process of purchasing a product those services are offered to the customer, but the problem is that I need to change that info to Spanish language. Here a screenhot: https://gyazo.com/f5f3543b970c4ddf1a3ad6023c0dc17b Thank you. 0 Quote Link to comment Share on other sites More sharing options...
papak011 Posted June 25, 2017 Share Posted June 25, 2017 Yes I^m interested toto to translate in german 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted June 26, 2017 Share Posted June 26, 2017 Looking at the store pages a couple of days ago some text is hard coded, hopfully this is resolved for the next version. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 27, 2017 Share Posted June 27, 2017 I can see three ways to fix this (though it shouldn't have been so badly thought out that such fixes were necessary! )... one option would be to use an action hook to modify the $addonsPromoOutput array and I suspect that if you were doing a true multilingual solution, that would be the way to go... but as you're only asking about one language and hopefully only a temporary fix is required (until WHMCS get their act together), the other two options can be achieved by editing the /templates/orderforms/standard_cart (or custom)/configureproduct.tpl template by changing... {foreach $addonsPromoOutput as $output} <div> {$output} </div> {/foreach} to... {foreach $addonsPromoOutput as $output} <div> {if $language eq 'spanish' and $output|strstr:'Powerful Website Builder'} {$output|replace:'Powerful Website Builder':'Generador de sitios web potente'|replace:'Add Weebly\'s drag and drop website builder to your hosting to allow you to create an awesome looking website, store or blog.':'Agregue el constructor del Web site del arrastrar y de la gota de Weebly a su recibimiento para permitir que usted cree un Web site, una tienda o un blog asombroso de la mirada.'|replace:'Learn more':'Aprende más'} {elseif $language eq 'spanish' and $output|strstr:'Protect your site with SSL'} {$output|replace:'Protect your site with SSL':'Proteja su sitio con SSL'|replace:'Add SSL to your web hosting to give visitors confidence that your website is safe and secure and help build trust.':'Agregue SSL a su alojamiento web para dar a los visitantes la confianza de que su sitio web es seguro y ayudar a crear confianza.'|replace:'Learn more':'Aprende más'} {else} {$output} {/if} </div> {/foreach} with apologies for the Spanish (I used Google translate!), that should give you something like this... all languages (apart from Spanish) will use the default values - in the above example, i've added the translations directly into the template, but there's nothing to stop you adding Language Overrides and using them in the replaces instead of the direct translations (i've only changed Weebly in the code below)... {foreach $addonsPromoOutput as $output} <div> {if $language eq 'spanish' and $output|strstr:'Powerful Website Builder'} {$output|replace:'Powerful Website Builder':{$LANG.store.websiteBuilder.addontitle}|replace:'Add Weebly\'s drag and drop website builder to your hosting to allow you to create an awesome looking website, store or blog.':{$LANG.store.websiteBuilder.addondesc}|replace:'Learn more':{$LANG.store.learnmore}} {elseif $language eq 'spanish' and $output|strstr:'Protect your site with SSL'} {$output|replace:'Protect your site with SSL':'Proteja su sitio con SSL'|replace:'Add SSL to your web hosting to give visitors confidence that your website is safe and secure and help build trust.':'Agregue SSL a su alojamiento web para dar a los visitantes la confianza de que su sitio web es seguro y ayudar a crear confianza.'|replace:'Learn more':'Aprende más'} {else} {$output} {/if} </div> {/foreach} $_LANG['store']['websiteBuilder']['addontitle'] = "Generador de sitios web potente"; $_LANG['store']['websiteBuilder']['addondesc'] = "Agregue el constructor del Web site del arrastrar y de la gota de Weebly a su recibimiento para permitir que usted cree un Web site, una tienda o un blog asombroso de la mirada."; $_LANG['store']['learnmore'] = "Aprende más"; if you wanted to change the English text too, then you could use Language Overrides and drop/adjust the language check in the if statement... that's sort of the third way I had in mind, you could really make it multilingual by checking if the override exists and using that. with regards to product addon names, you can translate these if you have dynamic translations enabled in setup -> general settings -> localisation and then add the translations to the addon names using the translation button in Product addons (ignore it says Arabic, that's just to make the screenshot easier!)... however, there is a bug in that the order summary / viewcart shows the default value and not the translated value... again, with further effort, you could fix this in the templates or by using hooks, but it's ridiculous how seemingly untested these features are. 1 Quote Link to comment Share on other sites More sharing options...
ocastaned Posted July 2, 2017 Author Share Posted July 2, 2017 (edited) --------UPDATE---- Please ignore this message below, I was just able to remove those addons from the checkout process. Thank you su much. Thank you so much. It worked fine, but now my question is, is there any way to remove both Addons from the checkout process. I am asking this because even though you fix worked fine, if a customer clicks on the link "for more information" they are taking to a landing page for that product, and that landing page is completely in English language. It think it would be easy just to remove them. This is a screenshot: http://prntscr.com/fqpc84 Edited July 2, 2017 by ocastaned 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 2, 2017 Share Posted July 2, 2017 for the sake of others, you can remove these addons from the cart process by unticking the "Show On Order Form" checkbox in setup -> product/services -> product addons. also, you might want to send a PM to plusplushosting, from the thread below, as he's translated these new store pages into Spanish already... perhaps if you ask nicely, he might share the updated templates and language files overrides with you... I know he's done the Weebly pages, not sure about the SSL Certificates. https://forum.whmcs.com/showthread.php?129858-marketplace-modules-languages-files and technically, if you just wanted to change the learn more links to a specific cart group, you could expand the above solution and add another replace. {foreach $addonsPromoOutput as $output} <div> {if $language eq 'spanish' and $output|strstr:'Powerful Website Builder'} {$output|replace:'Powerful Website Builder':{$LANG.store.websiteBuilder.addontitle}|replace:'Add Weebly\'s drag and drop website builder to your hosting to allow you to create an awesome looking website, store or blog.':{$LANG.store.websiteBuilder.addondesc}|replace:'Learn more':{$LANG.store.learnmore}|replace:'store/website-builder':'cart.php?gid=4'} {elseif $language eq 'spanish' and $output|strstr:'Protect your site with SSL'} {$output|replace:'Protect your site with SSL':'Proteja su sitio con SSL'|replace:'Add SSL to your web hosting to give visitors confidence that your website is safe and secure and help build trust.':'Agregue SSL a su alojamiento web para dar a los visitantes la confianza de que su sitio web es seguro y ayudar a crear confianza.'|replace:'Learn more':'Aprende más'} {else} {$output} {/if} </div> {/foreach} 0 Quote Link to comment Share on other sites More sharing options...
ocastaned Posted July 2, 2017 Author Share Posted July 2, 2017 Thank you so much. It worked fine. I think I just need help with two more places to translate. One is when ordering a hosting service and customer selects that he/she will use his own domain from another company. Here a screenshot: http://prntscr.com/fqsoiw And the second one is on the last page when checking out and customer do not write down credit cards details. Here a screenshot: http://prntscr.com/fqsoyy 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 2, 2017 Share Posted July 2, 2017 Thank you so much. It worked fine.I think I just need help with two more places to translate. One is when ordering a hosting service and customer selects that he/she will use his own domain from another company. Here a screenshot: http://prntscr.com/fqsoiw try using overrides for... $_LANG['orderForm']['domainInvalid'] = 'Invalid domain name provided'; $_LANG['orderForm']['domainLetterOrNumber'] = "Domains must begin with a letter or a number"; And the second one is on the last page when checking out and customer do not write down credit cards details. Here a screenshot: http://prntscr.com/fqsoyy it's not in the language files, or any template - so I can only assume it's hardcoded with the stripe gateway files.,, you could class that as a bug and report it. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.