Jump to content

Problem with translation


Recommended Posts

I have a CLOUD SLIDER Theme. 

Unfortunately, there is no translation of two words.

Annually and Monthly. 

 

$_LANG['orderpaymenttermannually'] = "Annually"; not work
$_LANG['cloudSlider']['orderpaymenttermannually'] = "Annually"; not work

it does not work only with this theme.

Reply from whmcs

 

Looking in to this, the CloudSlider order form uses embedded Javascript within the ~/templates/orderforms/cloud_slider/products.tpl file to generate this. It does not currently support translations of this string via the language file.

For example, on line 352:

    // Update the displayed price.
    jQuery("#priceTop").html(displayPrice);
    jQuery("#priceBottom").html(displayPrice);

To achieve this, you would need to edit the javascript to include translations. Unfortunately, this is not something WHMCS Technical Support is able to assist you with. Instead, I recommend posting your question in the Developer Corner at https://whmcs.community where a developer will likely be happy to assist you in editing the Javascript to fulfill your needs.

 

I am asking you for help THNX Thomas.

Link to comment
Share on other sites

On 1/9/2019 at 5:34 PM, Pectore said:

Reply from whmcs :

Looking in to this, the CloudSlider order form uses embedded Javascript within the ~/templates/orderforms/cloud_slider/products.tpl file to generate this. It does not currently support translations of this string via the language file.

To achieve this, you would need to edit the javascript to include translations. Unfortunately, this is not something WHMCS Technical Support is able to assist you with. Instead, I recommend posting your question in the Developer Corner at https://whmcs.community where a developer will likely be happy to assist you in editing the Javascript to fulfill your needs.

 

On 1/9/2019 at 5:34 PM, Pectore said:

I am asking you for help

contrary to the line Support gave you, I would suggest changing ~line 241...

            {if isset($product.pid)}
                "pid": "{$product.pid}",
                "displayPrice": "{$product.pricing.minprice.price}",
                "displayCycle": "{$product.pricing.minprice.cycle}",
            {else}
                "bid": "{$product.bid}",
                "displayPrice": "{$product.displayprice}",
                "displayCycle": "",
            {/if}

to...

            {if isset($product.pid)}
                {assign paymentterm "orderpaymentterm"|cat:$product.pricing.minprice.cycle}
                "pid": "{$product.pid}",
                "displayPrice": "{$product.pricing.minprice.price}",
                "displayCycle": "{$LANG.$paymentterm}",
            {else}
                "bid": "{$product.bid}",
                "displayPrice": "{$product.displayprice}",
                "displayCycle": "",
            {/if}

rgdclSf.png

there would be other ways to do it, but the above should be the simplest to follow - though keep a copy of those 2 changed lines because a WHMCS update will overwrite these files (if using the automatic updater).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated