Jump to content

Client domain translating


Recommended Posts

Hi Community

Please help us out here.

We want to translate the WHOIS / domain information but there is no translation PHP string.
We tried : $_LANG['domaincontactdetails']['Last Name'] = 'Achternaam’; but it is not working.
We raised a ticket with WHMCS and they reproduce the issue, we are using a Registar API and the complete form is in enlgish, therefore we are not able to translate.
The API from then Registar is not hardcoded and should be in our language as well.

Please see attached screenshot.

Is there a way we can translate this by our self?

Otherwise we need to wait becuase they cannot provide an estimated time for completion for this. However, once they resolve cases and push features they are available at their change log.

Thanks in advance

translate.png

Link to comment
Share on other sites

23 hours ago, DeeeExclusive said:

We raised a ticket with WHMCS and they reproduce the issue, we are using a Registar API and the complete form is in English, therefore we are not able to translate.

that makes sense - a lot of these strings are hardcoded in the registrar modules in English.

23 hours ago, DeeeExclusive said:

The API from then Registar is not hardcoded and should be in our language as well.

maybe it requires a language identifier to be passed in order to return in a language other than English - you may need to check that with the registrar... which registrar is it ??

23 hours ago, DeeeExclusive said:

Is there a way we can translate this by our self?

I would imagine that you could use a ClientAreaPageDomainContacts hook to manipulate the arrays and replace them with appropriate translations... in fact, I think there are existing bugs with this page because there is already a contactdetailstranslations array, but it is both not working properly or even being used! 🙄

you could also edit the clientareadomaincontactinfo.tpl template if that's easier and change ~ line 69...

<label>{$name}</label>

to...

<label>{if !empty($LANG.domaincontactdetails.{$name})}{$LANG.domaincontactdetails.{$name}}{else}{$name}{/if}</label>

which basically tells the template to see if there is an existing Language Override with the name of the current contact field - if there is, use it; if not, just use the existing name.

as you can see from the screenshot below, the fields with red arrows have been translated to Dutch (because they already exist in the dutch.php language file or override equivalent); the three with blue arrows haven't because those language strings don't exist.

K4KEmHV.png

for any missing translations, you would just need to add them to a /lang/overrides/dutch.php file...

$_LANG['domaincontactdetails']['Street 1'] = "straat 1";

aNRJY3Q.png

23 hours ago, DeeeExclusive said:

Otherwise we need to wait because they cannot provide an estimated time for completion for this. However, once they resolve cases and push features they are available at their change log.

aah you got the standard WHMCS Support reply... basically means that it could get released tomorrow, in the year 2024 or anytime between those two dates (or maybe not at all) - and you won't hear about any progress until it's released (if it is!) 🙄

Link to comment
Share on other sites

Thanks for your help Brian, youre so great to the cummunity

We are using the TransIP rigistar API.

We managed to override translate them all after changing line 69 you mention in your reply.
There are 3 more things which we would like to translate and these are not translating with : domaincontactdetails

Registrant contact Contact
Administrative contact Contact
Technical contact Contact

As well there a few fields that should be hidden, is this possible properly?
These are as well blank fields which the rigistar is not using at all ,except country code which is NL

Like : Middle name, Company KvK number, Fax number, Company type

Thanks in advance

Link to comment
Share on other sites

Managed to hide the domain fields from your post : https://whmcs.community/topic/282689-hide-some-domain-contact-fields-at-client-area/

Thanks allot

If you know how to translate these below that would be great,

Registrant contact Contact
Administrative contact Contact
Technical contact Contact

Link to comment
Share on other sites

4 hours ago, DeeeExclusive said:

If you know how to translate these below that would be great

this will be covered by line 36 in the same template file...

<h4>{$contactdetail} {$LANG.supportticketscontact}</h4>

where we have the registrar module passing "Registrant contact" to the template, and the template adding "Contact" again after it - great coding and testing by WHMCS! 🙄

the fix for this should be similar to the previous solution, so we would change the above line to...

<h4>{if !empty($LANG.domaincontactdetails.{$contactdetail})}{$LANG.domaincontactdetails.{$contactdetail}}{else}{$contactdetail}{/if} {$LANG.supportticketscontact}</h4>

and then we need to add 3 new language overrides...

$_LANG['domaincontactdetails']['Registrant contact'] = "Registreerder";
$_LANG['domaincontactdetails']['Administrative contact'] = "Administratieve";
$_LANG['domaincontactdetails']['Technical contact'] = "Technische";

RHm2UC9.png

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