Dragen Posted July 23, 2007 Share Posted July 23, 2007 I'm using the date function to echo out days of the week, which is extremely simple to do. But I'm working on a multi-language site where the user can choose their preffered language. I've sorted that part. The only thing I'm wondering about is, can I use the date() function to output foreign dates? so instead of echoing: monday, tuesday, wednesday it will echo something like: lundi, mardi, mercredi for a french viewer.. I suppose I could link it in with an array od days for each language, but it would simpler if ther was perhaps a foreign date() function of some sort. Any ideas? Quote Link to comment Share on other sites More sharing options...
redarrow Posted July 23, 2007 Share Posted July 23, 2007 when a user selects the correct lanuage all the shown information shold be in there lanuage this issue comes down to the inpelmentation of the converted languages. are you using google to convert the page lanuages? Quote Link to comment Share on other sites More sharing options...
Dragen Posted July 23, 2007 Author Share Posted July 23, 2007 no, I'm not using google. I've got a language system I've built in, where a user can select the language and all pages then read the correct text from the language file. I could easily list the days in each language in each file and write a function to do it, just thought it'd be easier if there was already a function to do it that I hadn't come across. Quote Link to comment Share on other sites More sharing options...
redarrow Posted July 23, 2007 Share Posted July 23, 2007 i think adding a date function() to the lanuage files is best. also you can get even more crazy and show lanuage via ip address lol. Quote Link to comment Share on other sites More sharing options...
Dragen Posted July 23, 2007 Author Share Posted July 23, 2007 Yeah I had thought of doing it by ip, but looking into it it seems quite unreliable. Many ip addresses seem to be from another planet... I know my ip address is located a very long way away from where I am, although still in the same country I think. I'd also thought of doing by reading the language that the browser is set too, but thought it would be simpler just to have it by a little button to click. Quote Link to comment Share on other sites More sharing options...
redarrow Posted July 23, 2007 Share Posted July 23, 2007 The way the pro's do it is use a css file for each lanuage of the same template and use small flags for countys. anyway good luck m8. Quote Link to comment Share on other sites More sharing options...
Dragen Posted July 24, 2007 Author Share Posted July 24, 2007 Yeah, I'm using flags What use would different css styles be for languages? I'm using different files which define constants that are used on the pages, such as define('SOMECONTENT', 'hello, this is some random gibberish'); defining it differently depending on which language file has been collected. 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.