Jump to content

Help translating mm/yy


ocastaned

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! 🙂

Link to comment
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">
Link to comment
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.

Link to comment
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.

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