Welcome Guest, Not a member yet? Register   Sign In
Multilanguage content
#1

[eluser]Rospo[/eluser]
Hello everybody!
I would like to know if CI can manage different language content to complete the multilanguage function.
So, for example, i create the table post with all the information and i generate the mvc for this item.
Now, my web site should be in english, spanish and french.
How can i give to the admin and to the author of the post the capacity to insert an article in english (default language) and then translate it in the other language?
And how can i show to the user only the content of his language? Even better, if i am spanish and there is the spanish version of a post i should read the spanish version. If there is not, i should see the english version!
Can CI help me for this?
Thanks!!!
#2

[eluser]ivantcholakov[/eluser]
The task you described is quite complex and CodeIgniter alone would not help you enough. If you intend to build a multilingual site and if you know all the things/aspects, anyway, the time you would need is 3-4 times higher than the time for a same single-language site.

You need to know how to deal with UTF-8.

About database structure see this article: http://www.apphp.com/tutorials/index.php...n-in-mysql . I prefer the approach #4.

... and there are more things, I can't explain all of them.

I would recommend you not to start from the pure CodeIgniter. Better examine this CodeIgniter based CMS: http://ionizecms.com/
#3

[eluser]Rospo[/eluser]
Hello ivantcholakov!
First of all, thanks for your help!
It's not the first time that I need to implement a multilanguage site and I always use the approach 4 from the list in that resource that you told me! I think is the better solution, scalable to add new language and easy to maintain!
The problem is that usually I write all my code alone, without any framework under, and now I would like to change my programming way using a framework!
Now, usually I add a code that, for each language that I have configured in my website, create my some fields in the form divided by accordion or tab, so that the user can easy choose the language that he want to edit. Then in the save process I iterate between all the language and save each language data in his row of the table.
So, I know how to work with this problem, the standard approach and so on! What I need to know is if there are any help system in CI that can fast up my procedure!
Do you think is a good idea to present all the language together or is better to add a single language each time?
You told me about using a ready cms and the work on it. I found that CI have lot of cms based on it.
Which is better? Which leave me more freedom in code writing for what I need?

Thanks for the help!
#4

[eluser]ivantcholakov[/eluser]
1.

The approach you described is possible, but I am not a fan for it. I don't save all data in all languages at once. I use a menu on the left of the form that shows links for switching language of DATA to be entered. So the form permits only one language to be edited. When the language is the DEFAULT one, the form allows all the fields to be edited - those that need translation and those that don't need translation. On the additional languages fields that don't need translation I show as static information (non-editable).

The language of DATA I identify using a GET parameter - language=bulgarian, etc. (if this GET parameter is missing, the default language is assuned for data). The language of the USER INTERFACE I identify by using a URI-segment - bg/ etc. For the default language I have a configuration option to remove the corresponding URI-segment.

Briefly saying one click on the button "Save" is related on one language only. Why? Because of validation. If data in all the languages is saved at once, validation gets complex beyond my taste. And showing visually validation messages for all the language would be a tricky thing, I can't imagine how it could be done nice.

2.

Many CMS solutions claim that are multilingual, but the multilingual concept is something complex. Check for "gotchas". :-) Form what researched in the past, IonizeCMS has the most correct multilingual implementation, at least in my eyes.

I don't use ready CMS solutions that are publicly available, so I can not make the comparison you asked for.
#5

[eluser]Rospo[/eluser]
So you suggest me ionizecms as starting point or case of study?
You prefer implement alone without any base cms your code?
I think having a base cms can help you to not write all the time the same code (acl, login, ...).

Anyway, really thanks for your help!
#6

[eluser]ivantcholakov[/eluser]
I have to use a proprietary legacy CMS that deals with languages according to the approach #2. This makes me unhappy, at some moment I will make a rewrite.

Anyway, I can see how complex thing a multi-language site might be. I recommend you first to try to find a yet ready CMS, research a little.




Theme © iAndrew 2016 - Forum software by © MyBB