ocastaned Posted May 22, 2017 Share Posted May 22, 2017 (edited) 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 May 22, 2017 by ocastaned 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 22, 2017 Share Posted May 22, 2017 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* 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í."; https://gyazo.com/ea528dfcd3b048085aa7649e4c1ecb66 unbelievable... that's managessl.tpl and there isn't one language string in there - EVERYTHING is hard-coded in English! <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. https://gyazo.com/dbcd35887b2183a543a7e64c447ca495 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. but i've just quickly checked the errors and store templates... they all seem to be hard-coded in English.... bangs head against wall! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.