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
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
http://www.interactivetools.com/forum/gforum.cgi?post=65129#65129
Hope that helps!
interactivetools.com
Re: [Dave] How to do multiple languages
That gets me part of the way, however is it possible to choose the tinyMCE language on the fly? For example, I have currently setup CMSB article table with two fields, Content (En) and Content (Fr). I would like to be able to use tinyMCE in French for the Fr field and in English for the En field.
Is this possible? My understanding was that tinyMCE could only handle one language at a time.... unless I can come up with a way of choosing between two version of tinyMCE!
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 11, 2009
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!
interactivetools.com
Re: [Dave] How to do multiple languages
northernpenguin
Northern Penguin Technologies
"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
Re: [Dave] How to do multiple languages
confused!
northernpenguin
Northern Penguin Technologies
"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke