• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Cataloger Multilanguage
PostPosted: Mon Jan 08, 2007 4:24 pm 
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


Top
  
 
 Post subject: Re: Cataloger Multilanguage
PostPosted: Mon Sep 10, 2007 7:38 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Mon Dec 11, 2006 6:44 am
Posts: 131
Location: Vilnius, Lithuania
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.


Top
 Profile  
 
 Post subject: Re: Cataloger Multilanguage
PostPosted: Wed Sep 12, 2007 9:33 am 
Offline
Forum Members
Forum Members
User avatar

Joined: Mon Dec 11, 2006 6:44 am
Posts: 131
Location: Vilnius, Lithuania
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:
Code:
-- the image JS code goes here --
{php}
if ($_REQUEST['hl']=='en'){
echo '
{/literal}
Attribute1: {attribute1en}
{literal}';}
} else { echo '
{/literal}
Attribute1: {attribute1ru}
{literal}';}
{/php}


Affcourse, it eliminates big part of cataloger module flexibility, but for today, i couldn find any better solution.


Top
 Profile  
 
 Post subject: Re: Cataloger Multilanguage
PostPosted: Sat Sep 15, 2007 11:15 am 
Offline
Support Guru
Support Guru
User avatar

Joined: Mon Jul 04, 2005 5:12 pm
Posts: 4820
Location: Ferrara, Italy
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:
Code:
-- the image JS code goes here --
{php}
if ($_REQUEST['hl']=='en'){
echo '
{/literal}
Attribute1: {attribute1en}
{literal}';}
} else { echo '
{/literal}
Attribute1: {attribute1ru}
{literal}';}
{/php}


Affcourse, it eliminates big part of cataloger module flexibility, but for today, i couldn find any better solution.



I read this topic now.
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

_________________
CMSMS Support Team
Italian Admin and Moderator

Plugins: Geolocate hostip, Multiple random image, Image rotator (beta), Content Pagination
Modules: ForumMadeSimple (Howto), TranslationManager
Multilingual: MLE is not CMSMS


Top
 Profile  
 
 Post subject: Re: Cataloger Multilanguage
PostPosted: Sun Sep 16, 2007 4:31 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Mon Dec 11, 2006 6:44 am
Posts: 131
Location: Vilnius, Lithuania
Thank you. CMS MS 1.1.2 MLE is the version of cms i have been waiting for a long time. ;)


Top
 Profile  
 
 Post subject: Re: Cataloger Multilanguage
PostPosted: Sat Nov 17, 2007 1:09 pm 
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  :)


Top
  
 
 Post subject: Re: Cataloger Multilanguage
PostPosted: Sat Nov 17, 2007 2:02 pm 
Offline
Support Guru
Support Guru
User avatar

Joined: Mon Jul 04, 2005 5:12 pm
Posts: 4820
Location: Ferrara, Italy
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.


$notes is hardcode in Catalog module.
You can use concat_lang plugin (in 1.2) but for your items only

Alby

_________________
CMSMS Support Team
Italian Admin and Moderator

Plugins: Geolocate hostip, Multiple random image, Image rotator (beta), Content Pagination
Modules: ForumMadeSimple (Howto), TranslationManager
Multilingual: MLE is not CMSMS


Top
 Profile  
 
 Post subject: Re: Cataloger Multilanguage
PostPosted: Wed Dec 12, 2007 8:56 pm 
Offline
Forum Members
Forum Members

Joined: Tue Oct 09, 2007 7:08 am
Posts: 200
Can you show how concat_lang is used...in this instance with "Notes"?

Thanks!

_________________
Web Design Company Directory


Top
 Profile  
 
 Post subject: Re: Cataloger Multilanguage
PostPosted: Thu Dec 13, 2007 10:05 pm 
Offline
Support Guru
Support Guru
User avatar

Joined: Mon Jul 04, 2005 5:12 pm
Posts: 4820
Location: Ferrara, Italy
giggler wrote:
Can you show how concat_lang is used...in this instance with "Notes"?


No, $notes is hardcoded. This is workaround (all modules are monolingual).
For personal attributes (ex: jpg_logo_LANG, name_LANG, icon_LANG where LANG are your languages) you can use:

Code:
{concat_lang lang="$lang" vars="jpg_logo,name,icon" separator="_"}


this substitute (ex:  jpg_logo_it_IT with jpg_logo)
and use $jpg_logo, $name, $icon in template

Alby

_________________
CMSMS Support Team
Italian Admin and Moderator

Plugins: Geolocate hostip, Multiple random image, Image rotator (beta), Content Pagination
Modules: ForumMadeSimple (Howto), TranslationManager
Multilingual: MLE is not CMSMS


Top
 Profile  
 
 Post subject: Re: Cataloger Multilanguage
PostPosted: Fri Dec 14, 2007 7:42 am 
Offline
Forum Members
Forum Members

Joined: Tue Oct 09, 2007 7:08 am
Posts: 200
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:
Code:
$this->mProperties->Add('string', 'notes', '');

Add this underneath:
Code:
$this->mProperties->Add('string', 'notes_es_ES', '');


Find this:
Code:
array_push($ret,array('Notes',create_textarea(true, $this->GetPropertyValue('notes'), 'notes', '', 'notes', '', $stylesheet, 80, 10)));


Add this underneath it:
Code:
array_push($ret,array('Notes_es_ES',create_textarea(true, $this->GetPropertyValue('notes_es_ES'), 'notes_es_ES', '', 'notes_es_ES', '', $stylesheet, 80, 10)));


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.

Code:
<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>


So let's say you create attributes for Size and another for Size_es_ES, you will put this in the template:

Code:
{if $lang==es_ES}{$size_es_ES}{else}{$size}{/if}


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...

_________________
Web Design Company Directory


Last edited by giggler on Fri Dec 14, 2007 8:02 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Cataloger Multilanguage
PostPosted: Sat Dec 15, 2007 2:08 am 
Offline
Forum Members
Forum Members

Joined: Tue Oct 09, 2007 7:08 am
Posts: 200
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:
Code:
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));
}


I've also tried
Code:
if ($_REQUEST['hl']=='es')

_________________
Web Design Company Directory


Top
 Profile  
 
 Post subject: Re: Cataloger Multilanguage
PostPosted: Sat Dec 15, 2007 9:34 am 
Offline
Support Guru
Support Guru
User avatar

Joined: Mon Jul 04, 2005 5:12 pm
Posts: 4820
Location: Ferrara, Italy
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

_________________
CMSMS Support Team
Italian Admin and Moderator

Plugins: Geolocate hostip, Multiple random image, Image rotator (beta), Content Pagination
Modules: ForumMadeSimple (Howto), TranslationManager
Multilingual: MLE is not CMSMS


Top
 Profile  
 
 Post subject: Re: Cataloger Multilanguage
PostPosted: Sat Dec 15, 2007 1:52 pm 
Offline
Forum Members
Forum Members

Joined: Tue Oct 09, 2007 7:08 am
Posts: 200
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!

_________________
Web Design Company Directory


Top
 Profile  
 
 Post subject: Re: Cataloger Multilanguage
PostPosted: Sun Dec 16, 2007 3:11 pm 
Offline
Support Guru
Support Guru
User avatar

Joined: Mon Jul 04, 2005 5:12 pm
Posts: 4820
Location: Ferrara, Italy
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!


Ok, I tested and worked. I thinked use concat_lang but in this way is better.
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:
 'ita' => array(
   'block'=>'it',
   'flag'=>'<img src="images/lang/it.png" style="border:0" alt="Italiano" />',
   'text'=>'Italiano',
   'locale_cms'=>'it_IT',
 ),


- User defined: nome

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

_________________
CMSMS Support Team
Italian Admin and Moderator

Plugins: Geolocate hostip, Multiple random image, Image rotator (beta), Content Pagination
Modules: ForumMadeSimple (Howto), TranslationManager
Multilingual: MLE is not CMSMS


Top
 Profile  
 
 Post subject: Re: Cataloger Multilanguage
PostPosted: Fri Dec 21, 2007 9:45 pm 
Offline
Support Guru
Support Guru
User avatar

Joined: Mon Jul 04, 2005 5:12 pm
Posts: 4820
Location: Ferrara, Italy
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


Attachments:
[The extension mpg has been deactivated and can no longer be displayed.]

_________________
CMSMS Support Team
Italian Admin and Moderator

Plugins: Geolocate hostip, Multiple random image, Image rotator (beta), Content Pagination
Modules: ForumMadeSimple (Howto), TranslationManager
Multilingual: MLE is not CMSMS
Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Arvixe - A CMSMS Partner