Multilanguage CMSMS MLE 1.3

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

Multilanguage CMSMS MLE 1.3

Post by alby »

Well,
History changelog here

Release in forge
Diff file is VS CMSMS 1.3


PAY ATTENTION TO UPDATE:
- icons flag are out of pack (there is download file in forge or read note of this)
- last options (from 1.02 MLE) are now in Site Admin > Global Settings but options in config_lang.php have priority
  (My advice is set in Admin and drop from config_lang.php, view config_lang.php.alby for example)

Alby
Last edited by alby on Wed Jun 25, 2008 8:01 am, edited 1 time in total.
Wiedmann
Forum Members
Forum Members
Posts: 233
Joined: Wed Mar 26, 2008 1:49 am

Re: Multilanguage CMSMS MLE 1.3

Post by Wiedmann »

- icons flag are out of pack (there is download file in forge or read note of this)
Some remarks for installing the icons:
a) create 2 directorys:
- images/lang
- admin/images/lang
b) copy the icons in both directorys

For updater:
Some icon names have changed. E.g. "en_US.png" is now "us.png".
- last options (from 1.02 MLE) are now in Site Admin > Global Settings but options in config_lang.php have priority
In "mle/function.mle.php" you should change line 10 to:

Code: Select all

		if(('' !== $replace) && (false !== strpos($val['flag'], $replace))) $hls[$key]['flag'] = str_replace($replace, $strreplace, $val['flag']);
mel
Forum Members
Forum Members
Posts: 147
Joined: Mon Dec 11, 2006 11:53 pm

Re: Multilanguage CMSMS MLE 1.3

Post by mel »

Hi,
I'm quite happy someone make precision about flags, but unfortunately I'm still unable to see it. I succeed to install 1.3-MLE yesterday, but I can't see any flags (not in admin nor in site). I create both directories, try keeping or changing this line 10 as Wiedmann said.
Ideas?
Version 1.6-MLE
alby

Re: Multilanguage CMSMS MLE 1.3

Post by alby »

mel wrote: I'm quite happy someone make precision about flags, but unfortunately I'm still unable to see it. I succeed to install 1.3-MLE yesterday, but I can't see any flags (not in admin nor in site). I create both directories, try keeping or changing this line 10 as Wiedmann said.
1. Create on cms_root/images a folder (ex: lang)
2. Put in this new folder your icons flags only  (ex: us.png, it.png, de.png)
3a. in config_lang.php use ABSOLUTE LINK for your icons flag (ex: 'flag' => '',)
3b. in config_lang.php use RELATIVE LINK but copy your folder images/lang in admin/images/lang


3a and 3b are alternative, first use 1 folder and second 2 folders
View also Tip #10 for opacity


Ok, look in admin and frontend

Alby
Last edited by alby on Tue Jun 10, 2008 7:42 am, edited 1 time in total.
mel
Forum Members
Forum Members
Posts: 147
Joined: Mon Dec 11, 2006 11:53 pm

Re: Multilanguage CMSMS MLE 1.3

Post by mel »

Hi,
I could'nt manage it...
The cms_root is it a directory? Because I was thinking I just have to create a /lang in folder /images already present after CMS installation.
The original config.lang.php contain a url link: /path_cms_root/images/lang/us.png"
Even both of them dont work for me...
Mel
Version 1.6-MLE
alby

Re: Multilanguage CMSMS MLE 1.3

Post by alby »

mel wrote: The cms_root is it a directory? Because I was thinking I just have to create a /lang in folder /images already present after CMS installation.
::)

No, is an alias for your "real" cmsms folder  :)
cms_root is the value (if exist) of subfolder of $config['root_url'] in your config.php if you drop http://www.mysite.com
Is the absolute link (relative to root of your webserver) for your images

For example:
$config['root_url'] = 'http://www.mysite.com';
'flag' => '',

$config['root_url'] = 'http://www.mysite.com/cmsmadesimple';
'flag' => '',

In case 3b use always images/lang (without first slash)
Is the relative to your cmsms folder position
'flag' => '',

but, in this case you must copy this folder also in admin/images/lang (if not admin don't know images/lang folder)

Alby
irish
Forum Members
Forum Members
Posts: 101
Joined: Tue Jun 03, 2008 2:31 pm

Re: Multilanguage CMSMS MLE 1.3

Post by irish »

Hi Alby,

First of all, thanks a lot for this cms system. I researched a few different ones out there but I found that the CMSMS has the flexability that I need. I have been experimenting with it for about a month now and wrote a module which works great.

Question: I just upgraded to MLE 1.3. It all works great. Is there a way to customise so that only certain languages flags will show up on certain pages. i.e. if I have three languages 'en', 'it', 'es', not all pages will be translated into all three languages. If page A is only translated to 'it' and 'es' then I only want those flags to display on that page, the 'en' flag should not display.
irish
Forum Members
Forum Members
Posts: 101
Joined: Tue Jun 03, 2008 2:31 pm

Re: Multilanguage CMSMS MLE 1.3

Post by irish »

I found a way of doing it, it's not very pretty but it's a start. I added this if statement to the function.lang.php

Code: Select all

		foreach($hls as $key=>$mle)
		{
// Start custom flag display
               if(!in_array('content_'.$mle['block'],$contentobj->mProperties->mPropertyNames)){
		        break;
		}
// Start custom flag display
              $link_url = $config['root_url'].'/'.$key.'/'.$_end_url_part;
then removed the languages that I didn't want to display from the cms_content.prop_names database table, so that the value now reads: content_it,content_es.

TODO: Set up a list of checkboxes in editcontent.php page in the admin area where the admin would be able to select the languages that they want displayed on the page. This would update the prop_names field in the cms_content database table.
alby

Re: Multilanguage CMSMS MLE 1.3

Post by alby »

irish wrote: then removed the languages that I didn't want to display from the cms_content.prop_names database table, so that the value now reads: content_it,content_es.
I don't like much  :-\

perhaps is better check table for presence of menu_text

Alby
Locked

Return to “[locked] CMSMS MLE fork”