MLE with over 20 languages but not every page has content...

This is a FORK of the CMS Made Simple project and is not oficially supported in any way by the CMS Made Simple development team.
moscato
Forum Members
Forum Members
Posts: 34
Joined: Thu Aug 02, 2007 1:11 pm

MLE with over 20 languages but not every page has content...

Post by moscato »

hi,

i've already set up a few installation with CMSMS MLE edition and it really works fine.

but now i've a project to set up with more than 20 languages.

some pages will have not content and so the system should switch to the default language in these cases. for example: if the user clicks on "german" and there is no content or title given, CMSMS should display the corresponding default language page (for example english).

is this possible? if not, do you know any trick or workaround for that?

thx a lot in advance!

yours,
tom
alby

Re: MLE with over 20 languages but not every page has content...

Post by alby »

moscato wrote: i've already set up a few installation with CMSMS MLE edition and it really works fine.

but now i've a project to set up with more than 20 languages.
:o

moscato wrote: some pages will have not content and so the system should switch to the default language in these cases. for example: if the user clicks on "german" and there is no content or title given, CMSMS should display the corresponding default language page (for example english).

is this possible? if not, do you know any trick or workaround for that?
If, in addition to the content, the menu text is missing you can use the tips #4
Otherwise should work a redirect

Alby
moscato
Forum Members
Forum Members
Posts: 34
Joined: Thu Aug 02, 2007 1:11 pm

Re: MLE with over 20 languages but not every page has content...

Post by moscato »

hi alby,

thx a lot for your constructive answer! this tip works fine if i do not want to display empty menu-entries.

but what would happen if i click on the flag for a page that is not translated (has no content / title).

what i would need is: if someone clicks on a flag, the corresponding default-language page should be shown if the desired page has no translation.

how can i manage that?

> 20 languages seem to be a lot. it's a big EU-project, so every EU-country gets their own language  :D


yours,
tom
alby

Re: MLE with over 20 languages but not every page has content...

Post by alby »

moscato wrote: what i would need is: if someone clicks on a flag, the corresponding default-language page should be shown if the desired page has no translation.

how can i manage that?
Look to tips #9

Alby
moscato
Forum Members
Forum Members
Posts: 34
Joined: Thu Aug 02, 2007 1:11 pm

Re: MLE with over 20 languages but not every page has content...

Post by moscato »

wow, really great! thx for that tip... sorry, that i didn't see tip #9 by myself  :D

btw: do you know, when the next CMSMS version will come out (with your integrated MLE functionality) and blog functionality?

greets,
tom
alby

Re: MLE with over 20 languages but not every page has content...

Post by alby »

moscato wrote: wow, really great! thx for that tip... sorry, that i didn't see tip #9 by myself  :D
Have you look the post date? I build this for your topic  ;)

moscato wrote: btw: do you know, when the next CMSMS version will come out (with your integrated MLE functionality) and blog functionality?
CMSMS MLE remain to 1.X
In 2.0 there is a multilingual functionality but it's not yet at the level of MLE but I still really contribute.

Alby
moscato
Forum Members
Forum Members
Posts: 34
Joined: Thu Aug 02, 2007 1:11 pm

Re: MLE with over 20 languages but not every page has content...

Post by moscato »

hi alby,

sorry, didn't forget to have a look at the posting-date... wow - thx a lot! really great!  :D

i've already tried your trick. seems to work fine, except: there is suddenly a second input-text-area when i edit my pages. don't know why?

but, the biggest problem i think, is that with trick #9 the WHOLE page is redirected and translated into the default language.

what i'm searching for is the following:

the submenu for "About Us" for example:

1.) History
2.) Team
3.) Contact

when the user clicks on "team" and team is not translated yet, just the CONTENT for team should be taken from the default language. the "surroundings" (menu-labels, footer, and so on) should remain in the actual language because, otherwise the user "switches" the WHOLE site to another language, which should not happen.

the user should stay in his choosen language and just the CONTENT-BLOCKS have to be in the default language.

i hope i could explain it as good as possible, what could be very usefull  :)

do you think there is a good solution to this challenge?

regards,
tom
alby

Re: MLE with over 20 languages but not every page has content...

Post by alby »

moscato wrote: do you think there is a good solution to this challenge?
Ok, I mistake this.
Try again with #9 (b. case) and report if works and if works with content block="XXX" also. Thanx

Alby
Last edited by alby on Sun Mar 23, 2008 2:47 pm, edited 1 time in total.
moscato
Forum Members
Forum Members
Posts: 34
Joined: Thu Aug 02, 2007 1:11 pm

Re: MLE with over 20 languages but not every page has content...

Post by moscato »

hi alby,

thx a lot for that tip. i'm trying to get it working the last days, but unfortunately it doesn't work with content blocks.

{content} works perfectly! but for example {content block='left'} doesn't work.

if tried to get it working by myself... i THINK: the problem is somewhere with the "endings"/"suffix" (en, it_IT, etc).. i think MLE tries to fetch the language which is still not ready.

it _think_ it's somewhere around here:

Code: Select all

$result = $smarty->fetch(str_replace(' ', '_', 'content:' . (isset($params['block'])?$params['block']:'content_en')), '', $pageinfo->content_id.'-'.$hl);
it would be really great if you could have a look at this because if your new function works with content blocks it's PERFECT!!

once again thank you for your great contribution!

thx a lot in advance!!

regards,
tom
alby

Re: MLE with over 20 languages but not every page has content...

Post by alby »

moscato wrote: thx a lot for that tip. i'm trying to get it working the last days, but unfortunately it doesn't work with content blocks.

{content} works perfectly! but for example {content block='left'} doesn't work.
I had this doubt and I was not able to test this.
Tomorrow I test and post this new patch. Please test and report.

Alby
moscato
Forum Members
Forum Members
Posts: 34
Joined: Thu Aug 02, 2007 1:11 pm

Re: MLE with over 20 languages but not every page has content...

Post by moscato »

hi alby,

a big "thank you" to u! can't wait for the patch  :D

to make this new function really usefull it would be extremly usefull, that also in the MENU the same pages are being displayed as if the user clicks on a flag. what i mean:

if the language is not ready yet, in the menu (and submenus) the english title (and link) should be displayed instead of being "empty". for example:

INFORMAZIONE
-- arrivo
-- our team (team is not ready in italian, so display "our team" and link to the english version)
-- contatto

i hope i could explain it somehow  ;)

is this possible?

best regards,
tom
alby

Re: MLE with over 20 languages but not every page has content...

Post by alby »

moscato wrote: is this possible?
Technically yes, but for this I was a bit doubtful for two reasons:
-- Force to have all pages translated (I see a bad thing to have a mix of languages on the same page). I wish I could have some empty page in some languages.
-- Rewrite Menumanager module, I would like to limit the hacking of modules especially those from the core in order to be faster in upgrades. Remember that I am alone for this project  ;)

Alby
moscato
Forum Members
Forum Members
Posts: 34
Joined: Thu Aug 02, 2007 1:11 pm

Re: MLE with over 20 languages but not every page has content...

Post by moscato »

hi alby,

thx for your quick reply!

i can understand your doubts... but if you have a page (as me) with 23 languages and for example 50 pages that are not translated yet you would have to edit more than 1.000 pages (copy & paste for example the english content into it or a redirect). so if these languages are not ready yet, it would be usefull that the corresponding _english_ content is displayed. this works with the flags, but would be great if the same works with the menu... displaying the english menu-title.

hm... if it's to "hardcore" to hack the menu-module, what do you think about a soultion concerning NOT the module, but the menu-TEMPLATE.

could you think about a solution modifying a menu-template, that the english-title is displayed if the language is not ready yet?

the menu-links of course should be the same because if the content is empty, the english content will be displayed (your tip#9).

if i know CMSMS better i would try it by myself, but i don't even know where to start :)

would be pleased about any help :)

best regards,
tom
alby

Re: MLE with over 20 languages but not every page has content...

Post by alby »

moscato wrote: hm... if it's to "hardcore" to hack the menu-module, what do you think about a soultion concerning NOT the module, but the menu-TEMPLATE.
It is technically feasible with a UDT that for every empty menu should look for menu title and alias of DEFAULT_LANG.

I can not look at this now because 1.2.4 is coming out but I think on this

Alby
moscato
Forum Members
Forum Members
Posts: 34
Joined: Thu Aug 02, 2007 1:11 pm

Re: MLE with over 20 languages but not every page has content...

Post by moscato »

hi alby,

thx again... could you give me tip where i can read a good documentation about cmsms "programming". where can i start?

1.2.4 => ! WOW ! can't wait to get it :) will it be available this weekend?  ;D

btw: do you have a solution for the "content block" problem at tip#9 ?

best regards,
tom
Locked

Return to “[locked] CMSMS MLE fork”