Jump to content
ocastaned

Help translating mm/yy

Recommended Posts

20 minutes ago, ocastaned said:

I need some help translating "mm/yy" during the checkout process to Spanish. This is a screensot: https://bit.ly/2HaNBaA

the MM/YY is hardcoded in the checkout.tpl template - perhaps a bug, more likely laziness on WHMCS' part in dealing with multilingual issues. 🙄

one option would be to create Language Overrides for every language that you use, and then update the template to use that override (MM / YY is used twice in the template) - or if your concern is only with Spanish, then change the line to...

<input type="tel" name="ccexpirydate" id="inputCardExpiry" class="field" placeholder="{if $language eq "spanish"}MM/AA{else}MM / YY{/if}{if $showccissuestart} ({$LANG.creditcardcardexpires}){/if}" autocomplete="cc-exp">

and every language other than Spanish will still see MM/YY - i'm assuming it should be MM/AA for Spanish? you'll know better than me! 🙂

Share this post


Link to post
Share on other sites

I already have created an overrides files, but I am seeing most of the lines starts with "$_LANG[" as you can see on this screesnhot: https://bit.ly/2UvgDEW

I am not sure if I should put all the line you just gave me or a different one?

Share this post


Link to post
Share on other sites
4 minutes ago, ocastaned said:

I already have created an overrides files, but I am seeing most of the lines starts with "$_LANG[" as you can see on this screesnhot: https://bit.ly/2UvgDEW

if you have created this ccdate language override for ALL of your languages, then you can use your override...

<input type="tel" name="ccexpirydate" id="inputCardExpiry" class="field" placeholder="{$LANG.ccdate}{if $showccissuestart} ({$LANG.creditcardcardexpires}){/if}" autocomplete="cc-exp">

if you've only created the override for Spanish, and don't want to create the overrides for the other languages, then adapt my previous code to...

<input type="tel" name="ccexpirydate" id="inputCardExpiry" class="field" placeholder="{if $language eq "spanish"}{$LANG.ccdate}{else}MM / YY{/if}{if $showccissuestart} ({$LANG.creditcardcardexpires}){/if}" autocomplete="cc-exp">

Share this post


Link to post
Share on other sites

I only created the override file for Spanish language. Just to be clear. Am I going to put this code line below into the Spanish override file?

 

<input type="tel" name="ccexpirydate" id="inputCardExpiry" class="field" placeholder="{if $language eq "spanish"}MM/AA{else}MM / YY{/if}{if $showccissuestart} ({$LANG.creditcardcardexpires}){/if}" autocomplete="cc-exp">

 

I already put it, but I am seeing an error in my site. 

 

On the other hand, If I am going to add that line to "my template" as you mention before, I would like to know which file in my template directory am I going to add it? I am currently using "Six" template.

Share this post


Link to post
Share on other sites
5 minutes ago, ocastaned said:

I only created the override file for Spanish language. Just to be clear. Am I going to put this code line below into the Spanish override file?

no - it goes in the checkout.tpl template, not in any language overrides file (that will be why you get the error message).

5 minutes ago, ocastaned said:

On the other hand, If I am going to add that line to "my template" as you mention before, I would like to know which file in my template directory am I going to add it? I am currently using "Six" template.

for you, it will go in the /clientes/templates/orderforms/standard_cart/checkout.tpl template - i'm assuming that you're using v7.7.1, if not, then your existing code might be different, but the replacement code for MM/YY of {if $language eq "spanish"}MM/AA{else}MM / YY{/if}  won't change regardless of WHMCS version.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

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