criat Posted November 1, 2013 Share Posted November 1, 2013 My date format is 1st/Oct/2013 I would like to translate this date to the language of the visitor, like in portuguese: 01/Out/2013 -- OR -- Use normal date for everyone (d/m/Y) = 01/11/2013, but if user select English Language, it changes to 1st/Oct/2013 I've came up with half the code, but I don't know how to complete it if($_SESSION['Language']=="english"){ //Insert Magic Here } Wich is better in your oppion, and any ideas on how to do it? Thanks 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 1, 2013 Share Posted November 1, 2013 I would probably forget the second option - coding wise it could be a real pain to do, nor does it take into account our American cousins who like to have the month before the date! the first option is more doable - but if you want it to work for all languages, then you are going to have to make a change to every template where a date is specified.. that could be a *lot* of changes as every edit would possibly have to include upto twelve translations for *each* language !! then you'd probably have to follow it through so that it was consistent on the emails and pdf invoices. if you really want to do it, I can tell you one possible solution as i'm currently working on a user contribution for making the product descriptions multilingual and so i'm familiar with translations... but as currently designed, WHMCS is not really multilingual and there is a limit to how much it can be modified to be so. you might be better off just sticking with one date format for everyone... but let me know if you *really* want to do this! 0 Quote Link to comment Share on other sites More sharing options...
criat Posted November 1, 2013 Author Share Posted November 1, 2013 I see. What about the ticket departments, can I translate them according to language? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 2, 2013 Share Posted November 2, 2013 I feel like i've opened Pandora's box with this multilingual project! I see. What about the ticket departments, can I translate them according to language? Yes... this is edited in the template theme rather than the order form, but the principle is the same... so you can translate ticket departments, knowledge base headings, their descriptions etc... I just found that WHMCS can have multilingual knowledge base articles, but it doesn't make the headings multilingual as an option! to return to the date issue, I was wrong when I said you'd need twelve translations for each language - the solution is simpler than that, but you'd still need to modify each date call in the code... i'll add it to the project. we use long dates (January, February etc) on our installation, and it only occurred to me when trying to look at the client area as non-English eyes, that there are important parts that are not translated - months being one. the translation method is easy, the time-consuming bit would be changing the template files for every mention of a date. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 3, 2013 Share Posted November 3, 2013 when you say your site format is "1st/Oct/2013", how is it currently being displayed in the client area ? 01/10/2013 or 1st Oct 2013 or to put it another way, what are your "Date Format" and "Client Date Format" settings in Setup -> General Settings -> Localisation ?? i've got this working so that it will translate month names, days of the week - next to do are the ordinal numbers (1st, 2nd, 3rd etc). what you want is easy enough to do, but I need to know your date format settings so that I can try it here. 0 Quote Link to comment Share on other sites More sharing options...
criat Posted November 7, 2013 Author Share Posted November 7, 2013 It is 1st/Oct/2013 0 Quote Link to comment Share on other sites More sharing options...
criat Posted March 4, 2014 Author Share Posted March 4, 2014 3 months later, I still don't know the answer to this question Can I change WHMCS to use d/m/Y? (03/03/2014 instead of 3rd/Mar/2014) There's no such option in Localisation tab 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 4, 2014 Share Posted March 4, 2014 3 months later, I still don't know the answer to this questionCan I change WHMCS to use d/m/Y? (03/03/2014 instead of 3rd/Mar/2014) There's no such option in Localisation tab the answer to whether this can be done is yes... I thought I replied about this in another thread last year there are a number of ways to do it - a long-winded method that will always work, a quicker solution that should and another that lets the client define their own date format! unfortunately, I'm not going into detail about any of the solutions here at this stage - it's possibly the second best solution I've written for WHMCS and I'm reluctant to give it away for free... I give too much away for nothing as it is and the line has to be drawn somewhere - I do need to earn an income you know! these are solutions that I would wish to commercialise and describing it here, even in vague terms, might prevent that - so I either need to sell this as a module (not imminent) or charge for converting existing sites to use the new code. feel free to PM if you want to discuss it further. 0 Quote Link to comment Share on other sites More sharing options...
clicweb Posted November 14, 2014 Share Posted November 14, 2014 feel free to PM if you want to discuss it further. Please contact me, I would like to to mod a whmcs 5.3.10 to multilingual setup french/english, I do not bother paying. info@clicwebsolutions.com Thank you, 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 14, 2014 Share Posted November 14, 2014 I would like to to mod a whmcs 5.3.10 to multilingual setup french/english, I do not bother paying. as you are already aware, Kian is writing a module that will provide multilingual options for the current version of whmcs. http://forum.whmcs.com/showthread.php?94915-multilingual-product-description if that addon doesn't meet your needs, or your issue is more about date formats than multilingual, then feel free to PM me. 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.