Page 1 of 1

Multi-lingual Things

Posted: Thu Dec 21, 2006 9:56 am
by shiznatix
Ok I am making a site and its going to be in however many languages they want. Now I am having a bit of a design problem with parts of it though.

There is going to be a shopping cart and so when the admin adds a new item in they put a name and a description. Well now this would have to be in every different language, so what I naturally think to do is cycle though all of the languages and put in a field for that language. The problem is that you now have 4 input's for the name and 4 textboxes for the description flying around. It gets messy, really messy.

I suppose I could use javascript to hide them and whatnot but I dont want to rely on javascript to make the page and also that would require custom javascript for each input area which would get annoying.

Is there a good way to do this that I havnt thought about?

Posted: Thu Dec 21, 2006 10:23 am
by theFool
Well another possibility would be to let the user select the language first and then show him only the text box for that language. But that would be a two step process then.

I've chosen the 'one textarea for every language' approch but used javascript to minimize unused fields. Is isn't that hard.

Re: Multi-lingual Things

Posted: Thu Dec 21, 2006 2:58 pm
by Christopher
shiznatix wrote: It gets messy, really messy.
There is not much you can do about the mess because there are multiple of everything. Certainly you can clean up the interface somewhat by hiding things, but in the long run it just slows down data entry for admins.

Posted: Fri Dec 22, 2006 7:44 pm
by Ambush Commander
Erm... how many different languages does the admin know? ;-)

I would go for an "Add a translation" modification button, perhaps giving the user one textarea for an initial alternate language. A bit of JavaScript can let the admin dynamically add more textareas, but it's not strictly necessary.

Posted: Fri Dec 22, 2006 9:36 pm
by Ollie Saunders
If you need to set a lot of data you need to set a lot of data...there's no way of getting away from it.
Erm... how many different languages does the admin know?
Perhaps the admin could make a choose before hand with a bunch of checkboxes saying what languages he knows, the goes in a session or a user table and then you use that not to overwhelm the admin with prompt for language he doesn't know.

Posted: Thu Dec 28, 2006 3:45 pm
by obiron
Sounds like a perfect job for code igniter or one of the other frameworks. You can pass the language code through the functions as an argument and have CI build the base HTML and just drop the relevant text into the correct locations. It takes a bit of work, but has the added advantage of being search engine friedly so you get lots of page rankings.

Posted: Thu Dec 28, 2006 4:04 pm
by alex.barylski
Not sure I understand your problem but...

Instead of one field for each language, why not have each language listed in an <option>

Still the same amount of work but slightly cleaner interface???