Almost real multilingual support

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
thumbsucker
Forum Members
Forum Members
Posts: 73
Joined: Thu Feb 09, 2006 1:38 pm

Re: Almost real multilingual support

Post by thumbsucker »

This would be a dream come true once it becomes part of the main release.  Please keep up the great work!
sparky

Re: Almost real multilingual support

Post by sparky »

katon wrote: With Ted's help, I have moved my bilingual support to version 0.12.  It takes some twists at the installation stage, but it's worth it if you need to have the same pages in both language versions.  You add the English version, and then you MUST add content in the other language as well. Maybe not perfect, but much better than have two different page trees.  Feel free to comment.
This multilingual support works just fine. Congratulatons.

My site and the various contents are in German. If I upload to multilngual version all the existing contents appear  in the English content areas. Is it possible that my existing contents in German appear in the German content areas after upload, so to change the default language?
peter19
New Member
New Member
Posts: 9
Joined: Wed Mar 22, 2006 4:20 pm

Re: Almost real multilingual support (news)

Post by peter19 »

At the moment the default language (English) can't be changed. I have a splash page though , so visitors should choose a language before entering the website, which works fine. I have one other question though.

Like mentioned in a previous post, I've modified the basic menu setup so when I clicked on a link in my bulletmenu, the language parameter wasn't active anymore. I've managed to fix this just by catching the language variabele and adding it to the url. This now works everywhere on my site, except for when I want to see the detail of a news-item. When I click on "more news", the language is switched to the default language (English) automatically.

I figured out I should add the language parameter to this code in News.module.php, but that doesn't seem to work :

/index.php?mact=News,cntnt01,rss&cntnt01showtemplate=false&cntnt01category='.rawurlencode($categories).'&cntnt01number=20&cntnt01returnid='.$gCms->variables['content_id'];

What am I doing wrong or how can I solve this?
peter19
New Member
New Member
Posts: 9
Joined: Wed Mar 22, 2006 4:20 pm

Re: Almost real multilingual support

Post by peter19 »

I think the default language CAN be changed. Just look in your index.php file for this line en change if to the language you would like to be default :

// line added by Katon
$lan = (isset($params['lan']) ? $params['lan'] : 'en');

I still have the problem I mentioned in the above post. I wil simplify my question : how can I add a new parameter to the news module?
katon

Re: Almost real multilingual support

Post by katon »

I understand the news menu needs to be modified to support multiple languages.  There are two ways to do this:
A) Alter database to offer support for multiple language versions of news items;
B) Use different categories for different languages. 
peter19
New Member
New Member
Posts: 9
Joined: Wed Mar 22, 2006 4:20 pm

Re: Almost real multilingual support

Post by peter19 »

I've implemented different categories for different languages. This works fine for the summary articles in the 3 languages I've implemented, but when i click on the detail link, the language parameter isn't added to the url. The site displays the detail page in the correct language, but my menu items switch to the default language.

So I'm looking for a way to have the language parameter added to the news detaillink. I've played around with the code but couldn't get this to work.
katon

Re: Almost real multilingual support

Post by katon »

Can you email me what you have done so I can take a look?
samurai

Re: Almost real multilingual support

Post by samurai »

Sweet!!! works like a charm  ;) tested with 6 languages, different templates and content.
Is it possible to set the chosen language in a cookie in the user's browser? So he/she won't have to select it again?

Thanks,
Geo
alex7575

Re: Almost real multilingual support

Post by alex7575 »

samurai wrote: Sweet!!! works like a charm  ;) tested with 6 languages, different templates and content.
Is it possible to set the chosen language in a cookie in the user's browser? So he/she won't have to select it again?

Thanks,
Geo
6 Languages?
On page content and news content?
Can you tell us how you make it? :)
samurai

Re: Almost real multilingual support

Post by samurai »

No news, sorry... only content. I only added more lines as per instructions in readme_multilingual.txt before I installed.

hth,
Geo
Defix
Forum Members
Forum Members
Posts: 20
Joined: Thu May 18, 2006 1:29 pm

Re: Almost real multilingual support

Post by Defix »

I use CMSMS multilingual version. I make three template with each language, but when I change template for english language all language templates change with english. :(
How I can display each language with own template. My site is trilingual (eng, est fin). When user click english language, then displayed english template or banner when click on finnish language then finnish banner or template and so on? How to do that? :o

Thanks
ZYV
Language Partners
Language Partners
Posts: 868
Joined: Tue Nov 15, 2005 9:08 pm

Re: Almost real multilingual support

Post by ZYV »

I am wondering if that's going to evolve to the post 1.0 bulit-in core multilingual support. If that's the case, it would be great if we could adopt a mixed approach, by mixed I mean use both the pages which ARE translated into many languages and single-language page.

Currently we have two solutions:

1) Separate content trees for every languages
2) Trees should EXACTLY match

I think that we need to be more flexible and adopt both approaches when that'll be merged with core. E.g. when user creates a content page it choses in which of the available languages it will be translated. E.g. you might  have 80% pages in English, French and Russian and 20% of pages Russian-only :)

Hope you get the point. I think that's fairily easy to implement since you already did the (2) and (1) is done via a Menu manager. Anyway, that would be a HUGE HUGE advantage.
unsigned double ZYV;
Pierre M.

Multilanguage Re: Almost real multilingual support

Post by Pierre M. »

Hello, I think multilanguage is a very cool feature, may be a must have as "galder" said ("Nowadays multilinguism is so important").
I have not yet tested "katon"'s CMSms version. But here are my €0,02 about this. Hope it helps.

User's view :
A)I like the screenshot because it is simple. KISS rules. But may I suggest to switch from the flag-icons to an unlimited drop down list with 2 letters languages codes ? I think that would be better than the n icons when n>4.
B)I think news are content not less than page content are content. I think it is simpler to treat news the same way content is treated. If the category is used to specify the language, it is a hack which perverts the content management semantic. If you patch CMSms to flag content with language, please do the same with news, please keep categories sane.
C)I think (my opinion again, please argue as you wish) that the content trees should be the same for all languages. Even more ! In fact there should be only one tree and multiple language tagged content leafs could be added to each node. Having the same organization keeps content management easy. This is CMS made simple after all. And that way you can have all pages in all languages or only some pages translated, your choice.

Net's view :
Please have a look at http://httpd.apache.org/docs/2.2/conten ... ation.html about language selection. HTTP has everything needed builtin, there is no need for cookies. All it takes is just to configure your browser.
Of course, if your browser requests (for you) the "es" version and this content is only available as "fr" or "de", the cms should serve one of the two according to a language preference priority list. May be with a customizable heading "Sorry, this content is not available in es".
Again, please, no URL polluting and no cookies. Websites powered by CMSms are content sites, not transactionnal ones, but allmost static pages. There is no need of cookies, unpretty URLs, scripts and other ugly hacks.

I'm sorry if my wording hurts, this is just a blahblah contribution, no code, no test.
PM
Kenny1

Re: Almost real multilingual support

Post by Kenny1 »

I will be trying this with 2 languages for now. Please keep this mod up to date as I think its a great addon to the cmsms.


:thumbsup:
Pierre M.

Re: Almost real multilingual support

Post by Pierre M. »

@katon, Ted and other devs : is the merge of this wonderfull feature planned for 1.0 ?
May be in 1b7 ?-)
PM
Post Reply

Return to “Tips and Tricks”