Search the Community
Showing results for tags 'translate'.
-
Hi, some question about the custom Fields is there a chance to translate them ? I added for the personal salutation a custom field, but as usual it is only one Language possible. therefor I created a custom Fiel to the Register-Page like but as you can see it is English and instead of Mister we have Herr. Here is the hook I use: function custom_welcome_back($vars) { global $smarty; $get_templatefile = $smarty->getVariable('templatefile')->value; if($get_templatefile == 'clientareahome'){ $get_orig_titel = $smarty->getVariable('LANG')->value; $get_details = $smarty->getVariable('clientsdetails')->value; return array( 'displayTitle' => $get_orig_titel['welcomeback'].', '. $get_details['customfields2'].' '.$get_details['lastname'], ); } } add_hook("ClientAreaPage",100,"custom_welcome_back"); Any Idea how to get this translated ? Thanks Christian
-
I need some help organizing the view of Payment methods on Standard Cart template. If you take a look at this screenshot https://prnt.sc/fqpgm0 you will notice my payments methods are showing very weird. I would like to have each payment method to be shown one per line. Also, I would like to translate "MM/YY" referring to month and year to Spanish. I must say something like this "MM/AA". Thank you guys for your help.
-
Regarding this "Client Email Footer Content", any way to translate it to multiple languages ? thanks !
-
I need help. When a customer orders a domain with extension .ES, in the next window he/she is asked for ID – TAX ID number, etc. The problem here is that several fields are duplicated. For example, VAT number and Administrative document number. I am not sure if there is a way to remove one of them, so I can make easier to my customer to continue with the order process. On the other hand, If VAT number and Administrative Document Number cannot be removed, I would like to translate them into Spanish language. I already searched for those terms on “additinaldomainfields.php” file but apparently they are not there. I am not sure where they are. This is a screenshot, so you can understand a little better. https://gyazo.com/18893204b0983b6906ae9d2e84e0c776
-
This module help on translating security questions easily through WHMCS Control Panel, without the need to make any adjustments to the template files, just upload it to addon modules directory, activate it, and add translations to your security questions. This module will present security questions in client area in which language your client is browsing your website with. Module Features: - Add translations for all languages available to your WHMCS installation - Add/Update/Delete translations easily - Display default question text if no translation is available for selected language - Prevent questions with no translation from being displayed - No template modification needed Installation: 1) Download the ZIP file from here 2) Upload the contents of to " /modules/addons/ " directory 3) Login to WHMCS -> Setup -> Addon Modules -> Security Questions Translator -> Activate 4) Manage your translations from WHMCS -> Addons -> Security Questions Translator Download: http://whmcms.com/dl.php?type=d&id=11
- 6 replies
-
- free module
- multi-language
-
(and 2 more)
Tagged with:
-
a question was asked by paperweight about allowing the security questions to be translated... http://forum.whmcs.com/showthread.php?94023-How-can-I-translate-quot-Security-Questions-quot-in-WHMCS although I can think of a number of ways to translate them in the Client Area, it would be more difficult to translate them in the Admin Area client profile - not least because it's an encrypted file with no template available to edit. http://docs.whmcs.com/Security_Questions it occurred to me that another way to do this might be to add security questions only for a specific language, e.g, someone using the site with English selected, will only see English questions; if French is selected from the language dropdown, they only see French questions etc. I think i've created a simple but elegant solution that works by first modifying the questions used, and then with very minor template edits to viewcart.tpl (ordering) and the security pages in the Client Area - it uses the language selected by the client to determine which security questions are shown to them. Step 1 - Modifying the Security Questions While you can add security questions in any language now, all of them will be shown to the customer - to avoid this, we need to find a way to assign a security question to a particular language. ideally, it would be easier if we could do this on the Security Questions page in the Admin Area - but obviously we can't, otherwise I wouldn't be writing this tutorial! however, what we can do is include the required language in the question itself and then use that in the templates to only show those question(s) in the selected language. to keep it simple, we will use two security questions: Mother's maiden name ? Name of your first pet ? what we do next is to modify these questions by adding a keyword to each that we can use in the templates to assign the question to a specific language - the obvious keyword to use is the language itself as used in the dropdown. Note: it must be added in lower-case, so 'english' will work, 'English' or 'enGlish' will not. Although it wouldn't be difficult to correct this and make it case-insensitive, it complicates the required Smarty code - also, this current method allows you to use the language word, e.g "English", in the actual question if you wish to. so let us take the second of these questions and now assign it a language. Name of your first pet ? english let's add a new security question for French users only.. Nom du premier animal de compagnie? french so now we have a specific security question for English and French customers. another important thing to note is if you are only using specific languages on your website, e.g English and French, then you only need to add security questions in those languages. however, if your website uses languages for which you don't have any security questions, then you need to add a "generic" question that will be shown to everyone - otherwise, if the user selects "Danish" and you don't have any specific Danish-language security questions, the security question dropdown will be empty. this generic question will be shown as exactly as entered by you in the Admin Area, and not in the language of the user. we can take our first security question and make that generic so all users will see it. Mother's maiden name ? generic so now that we have our three security questions, we can move on to the template modifications. Step 2 - Order Form Template Modifications in viewcart.tpl, the security questions are shown using the following code (I think its the same for all templates)... {foreach key=num item=question from=$securityquestions} <option value={$question.id}>{$question.question}</option> {/foreach} all we need to do is to add an {if} statement into it... {foreach key=num item=question from=$securityquestions} {if $question.question|strstr:$language or $question.question|strstr:'generic'} <option value="{$question.id}"{if $question.id eq $securityqid} selected{/if}>{$question.question|replace:$language|replace:'generic'}</option> {/if} {/foreach} this checks the security question to see if it contains the current value of $language (which is always lowercase), or the exact word 'generic' - if either is true, it shows the question with the language word ('english', 'french' etc removed); if false, the question isn't shown. obviously, you can change the word 'generic' to anything you want in your own language - as long as you don't include it, in lower-case, in the actual security question. also, if you don't need the 'generic' option, then you can remove it from the above code. below is a screenshot of viewcart.tpl with French language selected... the dropdown shows the 'generic' question along with the specific French question - the English "Name of pet?" question is not shown. that's all you should need to add to the order-forms to show specific language security questions. Step 3 - Client Area Template Modifications In the Client Area, I think there are only two templates that need to be modified - clientareasecurity.tpl and clientregister.tpl - both use the same code to show the security questions for those users that haven't set one... <select name="securityqid" id="securityqid"> {foreach key=num item=question from=$securityquestions} <option value={$question.id}>{$question.question}</option> {/foreach} </select> this needs to be changed to use code similar to that added previously to the order-form templates... <select name="securityqid" id="securityqid"> {foreach key=num item=question from=$securityquestions} {if $question.question|strstr:$language or $question.question|strstr:'generic'} <option value={$question.id}>{$question.question|replace:$language|replace:'generic'}</option> {/if} {/foreach} </select> if French is selected as the language, the security page in the Client Area will show the Generic and French questions... selecting English changes the page to only show the Generic and English questions... if the client already has a security question setup, then this is shown using the following code in clientareasecurity.tpl {if !$nocurrent} <div class="control-group"> <label class="control-label" for="currentans">{$currentquestion}</label> <div class="controls"> <input type="password" name="currentsecurityqans" id="currentans" /> </div> </div> {/if} similarly, $currentquestion needs to be tweaked to remove the language or 'generic'.. {if !$nocurrent} <div class="control-group"> <label class="control-label" for="currentans">{$currentquestion|replace:$language|replace:'generic'}</label> <div class="controls"> <input type="password" name="currentsecurityqans" id="currentans" /> </div> </div> {/if} Admin Area unfortunately, it's not possible to modify the Admin Area using this method - so in the client's profile, the security questions dropdown will contain the full questions (including the language and/or generic) - not ideal I know, but only admins will see it.
-
- multi-language
- security questions
-
(and 1 more)
Tagged with:
