Jump to content

How to find the Lang proper variable


Recommended Posts

I was wondering is there is a way to find the proper Lang variables for translating missing sections. The reason is because there are many sections that needs to be translated, but I am not able to find the correct variable in english.php file.

 

I am currently using this sample format on my override file:

 

$_LANG['accountNotifications'] = "Nuevo";

 

Here some screenshots of sections I need to translate:

 

https://gyazo.com/8acc0040551a34b2bd89ba976a7f3b1b

https://gyazo.com/ea528dfcd3b048085aa7649e4c1ecb66

https://gyazo.com/dbcd35887b2183a543a7e64c447ca495

 

Those sections I am showing in the screenshots are not in the english.php file. So technically I am not able to know which one is the variable.

 

I hope I am being clear.

Edited by ocastaned
Link to comment
Share on other sites

I was wondering is there is a way to find the proper Lang variables for translating missing sections. The reason is because there are many sections that needs to be translated, but I am not able to find the correct variable in english.php file.

I am currently using this sample format on my override file:

$_LANG['accountNotifications'] = "Nuevo";

Here some screenshots of sections I need to translate:

https://gyazo.com/8acc0040551a34b2bd89ba976a7f3b1b

this is a bug - for some bizarre reason, WHMCS have hard-coded the English text into the template as a placeholder... there was a language string there in v7.1.2, so why they changed it I simply don't know...

 

let's all be grateful v7.2 went through a thorough beta testing process! *coughs* :roll:

 

in knowledgebast.tpl, i'd suggest changing...

 

<input type="text" id="inputKnowledgebaseSearch" name="search" class="form-control" placeholder="What can we help you with?" />

to..

<input type="text" id="inputKnowledgebaseSearch" name="search" class="form-control" placeholder="{$LANG.kbsearchexplain}" />

and in knowledgebasecat.tpl...

<input type="text"  id="inputKnowledgebaseSearch" name="search" class="form-control" placeholder="What can we help you with?" value="{$searchterm}" />

to..

<input type="text"  id="inputKnowledgebaseSearch" name="search" class="form-control" placeholder="{$LANG.kbsearchexplain}" value="{$searchterm}" />

and then in your overrides file, modify the existing entry for...

$_LANG['kbsearchexplain'] = "¿Tiene una pregunta? Comience su búsqueda aquí.";

 

unbelievable... that's managessl.tpl and there isn't one language string in there - EVERYTHING is hard-coded in English! :roll:

 

            <tr>
               <th>Domain</th>
               <th>SSL Product</th>
               <th>Order Date</th>
               <th>Renewal Date</th>
               <th>Actions</th>
           </tr>

you could tweak it to...

 

            <tr>
               <th>{$LANG.orderdomain}</th>
               <th>SSL Product</th>
               <th>{$LANG.sslorderdate}</th>
               <th>Renewal Date</th>
               <th>{$LANG.actions}</th>
           </tr>

but I suspect what you should really do is go through the entire page and create new overrides for everything you want to translate...

 

e.g replace Renewal Date with {$LANG.sslrenewaldate} and add a custom entry to the overrides file...

 

$_LANG['sslrenewaldate'] = "Renewal Date";

 

there may be around 20 phrases to translate... if your site is only using Spanish, an alternative would be to just translate them in the template.

 

and they've done it again - header.tpl...

 

{if count($clientAlerts) > 0}<span class="label label-info">NEW</span>{/if}

if you could change that to...

{if count($clientAlerts) > 0}<span class="label label-info">{$LANG.notificationsnew}</span>{/if}

then you can add a language string in the override file...

$_LANG['notificationsnew'] = "Nuevo";

but you'd have to remember to add strings for all languages... or if you want to be lazy, you could do this...

{if count($clientAlerts) > 0}<span class="label label-info">{if $LANG.notificationsnew}{$LANG.notificationsnew}{else}NEW{/if}</span>{/if}

that will check if there is an existing language string override, if so it will use it (e.g Spanish), if not, it will just use "NEW".

 

I know the domain pricing matrix uses language strings... they haven't bothered to translate them into other languages, but at least the strings are there. :idea:

 

but i've just quickly checked the errors and store templates... they all seem to be hard-coded in English....

 

bangs head against wall! :twisted:

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