• 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.  [ 15 posts ] 
Author Message
 Post subject: Add a new language to cmsms mle?
PostPosted: Mon Feb 11, 2008 5:45 pm 
Offline
Forum Members
Forum Members

Joined: Tue Apr 25, 2006 8:30 am
Posts: 189
Hi,

Well thanks to the help of many of you here, not least Alby (the legend!) I have a working cmsms mle site! Next question: How do I add a new language? In this case Welsh. I have someone who can help with translation but how do I add the functionality to mle?

Sarah


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Add a new language to cmsms mle?
PostPosted: Mon Feb 11, 2008 6:37 pm 
Offline
Support Guru
Support Guru
User avatar

Joined: Mon Jul 04, 2005 5:12 pm
Posts: 4809
Location: Ferrara, Italy
sarah_h wrote:
Well thanks to the help of many of you here, not least Alby (the legend!)


;D


sarah_h wrote:
How do I add a new language? In this case Welsh. I have someone who can help with translation but how do I add the functionality to mle?


If there are a few changes only from en_US (I don't know), you can:

for admin part:
- create a folder admin/lang/cy_GB
- copy admin/lang/en_US.nls.php to admin/lang/cy_GB.nls.php
- copy admin/lang/en_US/admin.inc.php to admin/lang/cy_GB/admin.inc.php

for modules:
- copy modules/YOUR_MODULE/lang/en_US.php to modules/YOUR_MODULE/lang/ext/cy_GB.php

if there are many changes you should open a new translation at forge (there are others also who perhaps are interested, i.e. chipper)
Useful for CMSMS 2.0 also

Alby

_________________
Former Italian Admin and Moderator
Multilingual: MLE is not CMSMS


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Add a new language to cmsms mle?
PostPosted: Tue Oct 28, 2008 8:33 am 
Offline
Forum Members
Forum Members

Joined: Tue Apr 25, 2006 8:30 am
Posts: 189
Hi Alby,

I've finally got around to trying to add a new language. I have read this post again but I'm confused over this:

Your instructions don't mention whether I need to update the SQL. When i converted the site to MLE I needed to run several queries which set up en, fr and it. Don't I need to do the same for cy so that the page contents can be used in Welsh also?

Hope you can help

Sarah


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Add a new language to cmsms mle?
PostPosted: Tue Oct 28, 2008 8:59 am 
Offline
Support Guru
Support Guru
User avatar

Joined: Mon Jul 04, 2005 5:12 pm
Posts: 4809
Location: Ferrara, Italy
sarah_h wrote:
Your instructions don't mention whether I need to update the SQL. When i converted the site to MLE I needed to run several queries which set up en, fr and it. Don't I need to do the same for cy so that the page contents can be used in Welsh also?


Sure that you must add relative fileds (look README.FIRST):
ALTER TABLE cms_content ADD content_name_cy VARCHAR(160) NULL AFTER content_name;
ALTER TABLE cms_content ADD menu_text_cy VARCHAR(160) NULL AFTER menu_text;
ALTER TABLE cms_htmlblobs ADD html_cy TEXT NULL AFTER html;

There is UPDATE cms_content for entered content_cy but this depend of your setting (is same if you entered in any pages and Save)
I don't know if you have MLE extension then you must apply others 2 queries (look in README.extension)

Finaly you edit config_lang.php and put new language

Language files cy_GB are important because, in other case, you have en_US language

Alby

_________________
Former Italian Admin and Moderator
Multilingual: MLE is not CMSMS


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Add a new language to cmsms mle?
PostPosted: Tue Oct 28, 2008 9:58 am 
Offline
Forum Members
Forum Members

Joined: Tue Apr 25, 2006 8:30 am
Posts: 189
Hi Alby,

I've made these changes to the SQL:
Code:
ALTER TABLE cms_content ADD content_name_cy VARCHAR(160) NULL AFTER content_name;
ALTER TABLE cms_content ADD menu_text_cy VARCHAR(160) NULL AFTER menu_text;
ALTER TABLE cms_htmlblobs ADD html_cy TEXT NULL AFTER html;


I'm not sure what the extended means so I have not run the extra 2 queries.

and I've followed these instructions:
Code:
create a folder admin/lang/cy_GB
copy admin/lang/en_US.nls.php to admin/lang/cy_GB.nls.php
copy admin/lang/en_US/admin.inc.php to admin/lang/cy_GB/admin.inc.php


I  amended the config.lang.php file like this:
Code:
cy_GB ' => array(
   'block'=>'cy',
   'flag'=>'<img src="/path_cms_root/images/lang/fr.png" style="border:0; opacity:1;" alt="cymraeg" />',
   'text'=>'Cymraeg',
   'locale'=>'cy_GB .utf8@euro',
 )


When I go into admin>pages I see all the pages in english and I see links to english and welsh. So that looks ok but when I go to change the content of the welsh pages I cannot. The welsh link is greyed out. I can click it but it loads up the eng pages (the eng link I cannot click on so cmsms thinks this is the eng page!). I added a lang to the template to see what would happen and when I click the welsh link nothing changes!

I'm not sure what the problem is. Could it be the 2 queries I did not run for extended?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Add a new language to cmsms mle?
PostPosted: Tue Oct 28, 2008 10:09 am 
Offline
Support Guru
Support Guru
User avatar

Joined: Mon Jul 04, 2005 5:12 pm
Posts: 4809
Location: Ferrara, Italy
sarah_h wrote:
I'm not sure what the problem is. Could it be the 2 queries I did not run for extended?


1. In extended version you have metadata_lang and titleattribute_lang
Have you metadata_en and titleattribute_en for example?


2. In README.FIRST you read:
Quote:
II. Change or add (content_block) in: 'content_en,content_it,content_fr' string to match your 'block' config_lang.php

UPDATE cms_content SET prop_names = REPLACE(prop_names,'content_en','content_en,content_it,content_fr') WHERE prop_names LIKE '%content_en%';


Now you have already content_en,content_it,content_fr .....
But if you save a page in other languages should create relative 'content_cy' value necessary for Welsh page after
Edit and save a page in english and look if 'prop_names' filed of cms_content you have content_cy


Alby

_________________
Former Italian Admin and Moderator
Multilingual: MLE is not CMSMS


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Add a new language to cmsms mle?
PostPosted: Tue Oct 28, 2008 10:35 am 
Offline
Forum Members
Forum Members

Joined: Tue Apr 25, 2006 8:30 am
Posts: 189
No, I don't seem have metadata_lang or titleattribute_lang. Do I need them?

I edited an eng page and it did save it and when I looked at I did see content_cy in the prop_names yes.

I added a new page in eng, then saved it. Then I edited the welsh version of that page and it changed the eng page. The flags are definitely not working correctly. When looking at eng pages the eng flag is not clickable but the welsh is. That's right but when I click on the welsh flag it stays grey and eng stays bright. Nothing changes when the welsh flag is clicked. So I never see any welsh content.

So it seems that the welsh pages are never selected this is the same on the site using the lang. Click on welsh and nothing changes although I do see &hl=cy_GB added to the url string.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Add a new language to cmsms mle?
PostPosted: Tue Oct 28, 2008 10:58 am 
Offline
Support Guru
Support Guru
User avatar

Joined: Mon Jul 04, 2005 5:12 pm
Posts: 4809
Location: Ferrara, Italy
What is the version?

Alby

_________________
Former Italian Admin and Moderator
Multilingual: MLE is not CMSMS


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Add a new language to cmsms mle?
PostPosted: Tue Oct 28, 2008 8:08 pm 
Offline
Forum Members
Forum Members

Joined: Tue Apr 25, 2006 8:30 am
Posts: 189
Version CMSMS 1.4.1

I converted from a non-mle version. It all worked after the conversion. I just need to add another lang. I've been testing all afternoon and I cannot see anything wrong with what I've done. Maybe I'll have another look in the morning.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: [solved] Re: Add a new language to cmsms mle?
PostPosted: Mon Nov 03, 2008 12:07 pm 
Offline
Forum Members
Forum Members

Joined: Tue Apr 25, 2006 8:30 am
Posts: 189
Well, after lots of frustrating days i finally got it all working. How, by re doing everything again! So i MUST have missed something while I was working. I think it was during the MySQL changes. Moral of the story: ALWAYS keep notes!

Thanks Alby, for trying to help. Now I have notes and I should be ok if I need to do it again.

:)


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Add a new language to cmsms mle?
PostPosted: Sat Nov 08, 2008 12:50 pm 
Offline
Forum Members
Forum Members

Joined: Thu Aug 07, 2008 12:45 pm
Posts: 132
Location: Thailand
As being one of the utmost lazy ones, I tried to generate text files which will be created according of the language selection, not successful. People experienced in php programming (I'm not :-\) should be able to get such files, which then can be copied to phpMyAdmin or directly insert the commands into the database.

Right now my test ML page works, but it get messed up each time I try to change the primary language and add another one.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Add a new language to cmsms mle?
PostPosted: Sat Nov 08, 2008 2:55 pm 
Offline
Support Guru
Support Guru
User avatar

Joined: Mon Jul 04, 2005 5:12 pm
Posts: 4809
Location: Ferrara, Italy
TeXnik wrote:
Right now my test ML page works, but it get messed up each time I try to change the primary language and add another one.


Primary or default language as type string (label display) should be chosen the first time and never changed

Alby

_________________
Former Italian Admin and Moderator
Multilingual: MLE is not CMSMS


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Add a new language to cmsms mle?
PostPosted: Mon Nov 10, 2008 2:18 pm 
Offline
Forum Members
Forum Members

Joined: Thu Aug 07, 2008 12:45 pm
Posts: 132
Location: Thailand
Thanks. First I installed in English to see how it is working and decided later to change to German.

So now I have to install it new with a different primary language. Will a backup of the database work or must all the data created a new?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Add a new language to cmsms mle?
PostPosted: Mon Nov 10, 2008 3:24 pm 
Offline
Support Guru
Support Guru
User avatar

Joined: Mon Jul 04, 2005 5:12 pm
Posts: 4809
Location: Ferrara, Italy
TeXnik wrote:
So now I have to install it new with a different primary language. Will a backup of the database work or must all the data created a new?


No, change in config_lang.php AND:
1. drop all your cookie site
2. close your browser and reopen

Alby

_________________
Former Italian Admin and Moderator
Multilingual: MLE is not CMSMS


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Add a new language to cmsms mle?
PostPosted: Thu Sep 30, 2010 7:16 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu May 14, 2009 8:11 pm
Posts: 1264
Location: Lithuania
Current CMSms-mle-fork can change default language on admin panel "Site Admin » Global Settings > MLE languages".

_________________
My best friends are: FAQ: How can I debug my code/site ?...showtemplate=false...module_customhow to create a patch, {process_pagedata}
And Yours ? :)


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 15 posts ] 

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:  
cron
A2 Hosting