Cataloger Multilanguage
Cataloger Multilanguage
hi there
anyone was able to implement multilanguge capability for cataloger module ?
if not, do you have any idea where to modify the module ?
bye
anyone was able to implement multilanguge capability for cataloger module ?
if not, do you have any idea where to modify the module ?
bye
Re: Cataloger Multilanguage
I have just ran into the same problem. Maybe somebody has got any solution for that?
My guess i could solve this with different attributes for each language. My item attribute list would look like this:
EN item1
RU item1
FR item1
EN item2
Ru item2
FR item2....
Then with separate three templates for different languages i could call each of the attributes...
But the problem is: how could i call different cataloger templates with different language selections?
CMS MS: 1.0.2 MLE, cataloger: 0.5.3
Has anybody got any other thoughts or suggestions?
Yhanks in advance.
My guess i could solve this with different attributes for each language. My item attribute list would look like this:
EN item1
RU item1
FR item1
EN item2
Ru item2
FR item2....
Then with separate three templates for different languages i could call each of the attributes...
But the problem is: how could i call different cataloger templates with different language selections?
CMS MS: 1.0.2 MLE, cataloger: 0.5.3
Has anybody got any other thoughts or suggestions?
Yhanks in advance.
Re: Cataloger Multilanguage
Well.. i have got far far not the best solution for this problem, but for my CMS MS 1.0.2 MLE site this works.
I created different attributes for diffrent languages: attribute1RU ant attribute1EN.
In my cataloger item template i put:
Affcourse, it eliminates big part of cataloger module flexibility, but for today, i couldn find any better solution.
I created different attributes for diffrent languages: attribute1RU ant attribute1EN.
In my cataloger item template i put:
Code: Select all
-- the image JS code goes here --
{php}
if ($_REQUEST['hl']=='en'){
echo '
{/literal}
Attribute1: {attribute1en}
{literal}';}
} else { echo '
{/literal}
Attribute1: {attribute1ru}
{literal}';}
{/php}
Re: Cataloger Multilanguage
I read this topic now.liudaz wrote: Well.. i have got far far not the best solution for this problem, but for my CMS MS 1.0.2 MLE site this works.
I created different attributes for diffrent languages: attribute1RU ant attribute1EN.
In my cataloger item template i put:Affcourse, it eliminates big part of cataloger module flexibility, but for today, i couldn find any better solution.Code: Select all
-- the image JS code goes here -- {php} if ($_REQUEST['hl']=='en'){ echo ' {/literal} Attribute1: {attribute1en} {literal}';} } else { echo ' {/literal} Attribute1: {attribute1ru} {literal}';} {/php}
I am testing an other solution. I add a function for translate, for example, $jpg_logo_en_US or $jpg_logo_it_IT or $jpg_logo_de_DE to generic $jpg_logo for use in multilingual module template
Follow this topic for 1.2 release
Alby
Re: Cataloger Multilanguage
Thank you. CMS MS 1.1.2 MLE is the version of cms i have been waiting for a long time. 

Re: Cataloger Multilanguage
Hello, I am new in CMSMS i have the same problem with {$notes} function in catalog module, what can I do to use this Catalog function in my multi language site.
10q very much
10q very much

Re: Cataloger Multilanguage
$notes is hardcode in Catalog module.freelage wrote: Hello, I am new in CMSMS i have the same problem with {$notes} function in catalog module, what can I do to use this Catalog function in my multi language site.
You can use concat_lang plugin (in 1.2) but for your items only
Alby
Re: Cataloger Multilanguage
Can you show how concat_lang is used...in this instance with "Notes"?
Thanks!
Thanks!
Re: Cataloger Multilanguage
No, $notes is hardcoded. This is workaround (all modules are monolingual).giggler wrote: Can you show how concat_lang is used...in this instance with "Notes"?
For personal attributes (ex: jpg_logo_LANG, name_LANG, icon_LANG where LANG are your languages) you can use:
Code: Select all
{concat_lang lang="$lang" vars="jpg_logo,name,icon" separator="_"}
and use $jpg_logo, $name, $icon in template
Alby
Re: Cataloger Multilanguage
K, this actually works if you want to use Notes for different language and yes you do need to change the modules files:
action.edittempl.php
contenttype.catalogcategory.php
contenttype.catalogitem.php
contenttype.catalogitem.php
Anywhere you see Notes, add the same code for Notes_es_ES (or what ever the language is) for example:
Find this:
Add this underneath:
Find this:
Add this underneath it:
The easier way is open the files mentioned above and just do a search for notes and follow the concept of adding things for Note_xx_XX.
As for the sub template you are using - in this case, I've delete all the other auto attribute code for the item template.
So let's say you create attributes for Size and another for Size_es_ES, you will put this in the template:
if you have different more than two language, then just keep adding the language and keep using else and elseif statement. Of course this is going to make your cataloger input page really really long if you have lots of attributes, but at the moment this will work.
BTW-there might be a way to make it so that each of the language input boxes actually appear when you click on the flag in admin for the item page so it's not so messy and it's probably in action.editempl.php or contetype file - I just don't know how to do that at the moment... But seriously, since you can use notes to input anything you want (and style it the way you want), why not just put all the attributes there instead of one box for each attribute, this will make the item input page nice and short...
action.edittempl.php
contenttype.catalogcategory.php
contenttype.catalogitem.php
contenttype.catalogitem.php
Anywhere you see Notes, add the same code for Notes_es_ES (or what ever the language is) for example:
Find this:
Code: Select all
$this->mProperties->Add('string', 'notes', '');
Code: Select all
$this->mProperties->Add('string', 'notes_es_ES', '');
Code: Select all
array_push($ret,array('Notes',create_textarea(true, $this->GetPropertyValue('notes'), 'notes', '', 'notes', '', $stylesheet, 80, 10)));
Code: Select all
array_push($ret,array('Notes_es_ES',create_textarea(true, $this->GetPropertyValue('notes_es_ES'), 'notes_es_ES', '', 'notes_es_ES', '', $stylesheet, 80, 10)));
As for the sub template you are using - in this case, I've delete all the other auto attribute code for the item template.
Code: Select all
<div class="catalog_item">
<p>{$title}</p>
{if $lang==es_ES}{$notes_es_ES}{else}{$notes}{/if}</div>
{literal}
<__script__ type="text/javascript">
function repl(img)
{
document.item_image.src=img;
}
</__script>
{/literal}
</div>
Code: Select all
{if $lang==es_ES}{$size_es_ES}{else}{$size}{/if}
BTW-there might be a way to make it so that each of the language input boxes actually appear when you click on the flag in admin for the item page so it's not so messy and it's probably in action.editempl.php or contetype file - I just don't know how to do that at the moment... But seriously, since you can use notes to input anything you want (and style it the way you want), why not just put all the attributes there instead of one box for each attribute, this will make the item input page nice and short...
Last edited by giggler on Fri Dec 14, 2007 8:02 am, edited 1 time in total.
Re: Cataloger Multilanguage
Alby, for the above multilang for notes workaround I posted - I was wondering if there is a way to use something like this for files like contentype.cataglogitem.php so that the correct field appear for the correct language page in Admin as well:
I've tried this and it woudn't work:
I've also tried
I've tried this and it woudn't work:
Code: Select all
if ($lang =='es')
{
$ret[] = array('Notes_es_ES',create_textarea(true, $this->GetPropertyValue('notes_es_ES'), 'notes_es_ES', '', 'notes_es_ES', '', $stylesheet, 80, 10));
}
Code: Select all
if ($_REQUEST['hl']=='es')
Re: Cataloger Multilanguage
Today I give a look that is at home with the influence 
However, not much agree with modules make multilingual because:
(1) change very often
(2) is not saying that this version of module works well with that version of CMSMS MLE
(3) are many modules and I am one and I should also follow other projects besides CMSMS !!
Alby

However, not much agree with modules make multilingual because:
(1) change very often
(2) is not saying that this version of module works well with that version of CMSMS MLE
(3) are many modules and I am one and I should also follow other projects besides CMSMS !!
Alby
Re: Cataloger Multilanguage
Hi Alby - You're right and don't worry about it because I think it's already a great thing you did with MLE and I'm sure modules being still in one language isn't going to be a big deal.
Thanks for your hard work!
Thanks for your hard work!
Re: Cataloger Multilanguage
Ok, I tested and worked. I thinked use concat_lang but in this way is better.giggler wrote: Hi Alby - You're right and don't worry about it because I think it's already a great thing you did with MLE and I'm sure modules being still in one language isn't going to be a big deal.
Thanks for your hard work!
NOW I modify contenttype.catalogitem.php ONLY, today see for other two contenttype and tomorrow post results.
It's totaly transparent:
- notes and user attributes are transformed in NAME_LANGKEY
- in display (cataloger template) you continue with {$NAME}
Ex, my conf testing:
- LANG:
Code: Select all
'ita' => array(
'block'=>'it',
'flag'=>'<img src="images/lang/it.png" style="border:0" alt="Italiano" />',
'text'=>'Italiano',
'locale_cms'=>'it_IT',
),
In editing you have (label text): Nome_ita (for nome) and Notes (no, it's correct but hidden, view source for notes_ita)
In display use always: {$nome} and {$notes}
Alby
Re: Cataloger Multilanguage
Someone can test this attach (VS Cataloger 0.5.6)?
Important:
- backup Cataloger folder
- backup DB
- uncompress files and overwrite (check date file)
- No modify your template
- For new catalog/item there aren't problems
- For edit prev catalog/item, you must enter in page and submit only (this modify your variables), re-enter in page and edit your values and submit again (re-enter in page for check if values are taken)
Alby
Important:
- backup Cataloger folder
- backup DB
- uncompress files and overwrite (check date file)
- No modify your template
- For new catalog/item there aren't problems
- For edit prev catalog/item, you must enter in page and submit only (this modify your variables), re-enter in page and edit your values and submit again (re-enter in page for check if values are taken)
Alby
- Attachments
-
[The extension mpg has been deactivated and can no longer be displayed.]