How to do multiple languages

6 posts by 2 authors in: Forums > CMS Builder
Last Post: August 11, 2009   (RSS)

By northernpenguin - August 10, 2009 - edited: August 10, 2009

Dave: I know this is an old post, but I have a question about this subject.

My clients wants to be able to add an article in both English and French (with accents). Is there any way to do that in CMSB v1.32?

Update: Detached post and renamed title (Dave)
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

Re: [northernpenguin] How to do multiple languages

By Dave - August 10, 2009

Yes, there is. Have a look at this post:
http://www.interactivetools.com/forum/gforum.cgi?post=65129#65129

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [northernpenguin] How to do multiple languages

By Dave - August 11, 2009

Hi northernpenguin,

We could probably do some custom code for that. But you'd need to come up with a naming convention such as french fields end in _fr. If you had that you could edit /lib/wysiwyg.php and replace this line:

languages : '{$SETTINGS['wysiwyg']['wysiwygLang']}',

With this:
languages : 'en,fr',

And add this code in red further down:

$language = preg_match("/_fr$/", $fieldname) ? 'fr' : 'en';
// display field
print <<<__HTML__

<script language="javascript" type="text/javascript"><!--
tinyMCE.init({
mode : "exact",
theme : "advanced",
language: "{$language}",


Let me know if that works for you. It may require some more experimentation as the wysiwyg (tinymce) has a lot of features and can be complex at times.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] How to do multiple languages

Thanx Dave. I will give it a try later tonight and get back to you.
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

Re: [Dave] How to do multiple languages

Dave: I followed your instructions, and I'm not really sure what happened! I have attached 2 snapshots of CMSB - adding a new record.

confused!
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
Attachments:

image1.tiff 73K

image2.tiff 89K