<![CDATA[ problem in adding a new language to TinyMCE - MODX Community Forums]]> https://forums.modx.com/thread/?thread=45816 <![CDATA[Re: problem in adding a new language to TinyMCE]]> https://forums.modx.com/thread/45816/problem-in-adding-a-new-language-to-tinymce?page=2#dis-post-265250 Quote from: joeindio at Dec 23, 2006, 05:11 AM

Hi there,

Didn’t quite understand if after all you got the language working...After installing a site, if you edit the lines i mentioned INSIDE THE MANAGER (Resources > Plugins > TinyMCE > Plugin Code), it should be working! Mine is...

And if you change the .tpl file inside an install package, the change should appear already in a site freshly installed with that package...If not, test the change, editing the plugin directly inside the MODx manager. If it works that way, solving this is a matter of telling people that download your package how to change the lines inside the MODx manager

Anyway, you’re right - i also hope that someone more code-oriented can see what’s happening with the [tt]$tinymce_language[/tt] handle and fix this (Bravado?!? wink)

Good luck,

JP
oh thank you for your point
we should change language value of this section too

	tinyMCE.init({
		  $theme
		  mode : "exact",
		  language : "pe",
		  $elmList
		  theme_advanced_blockformats : "{$tinymce_formats}",
		  valid_elements : tinymce_valid_elements,
		  extended_valid_elements : tinymce_extended_valid_elements,
		  invalid_elements : tinymce_invalid_elements,
]]>
farhad Dec 22, 2006, 11:32 PM https://forums.modx.com/thread/45816/problem-in-adding-a-new-language-to-tinymce?page=2#dis-post-265250
<![CDATA[Re: problem in adding a new language to TinyMCE]]> https://forums.modx.com/thread/45816/problem-in-adding-a-new-language-to-tinymce?page=2#dis-post-265249
Didn’t quite understand if after all you got the language working...After installing a site, if you edit the lines i mentioned INSIDE THE MANAGER (Resources > Plugins > TinyMCE > Plugin Code), it should be working! Mine is...

And if you change the .tpl file inside an install package, the change should appear already in a site freshly installed with that package...If not, test the change, editing the plugin directly inside the MODx manager. If it works that way, solving this is a matter of telling people that download your package how to change the lines inside the MODx manager

Anyway, you’re right - i also hope that someone more code-oriented can see what’s happening with the [tt]$tinymce_language[/tt] handle and fix this (Bravado?!? wink)

Good luck,

JP]]>
joeindio Dec 22, 2006, 11:11 PM https://forums.modx.com/thread/45816/problem-in-adding-a-new-language-to-tinymce?page=2#dis-post-265249
<![CDATA[Re: problem in adding a new language to TinyMCE]]> https://forums.modx.com/thread/45816/problem-in-adding-a-new-language-to-tinymce#dis-post-265248 1- change to RTL direction
2- change to persian language
3- change to right align toolbar
wink]]>
farhad Dec 22, 2006, 11:03 PM https://forums.modx.com/thread/45816/problem-in-adding-a-new-language-to-tinymce#dis-post-265248
<![CDATA[Re: problem in adding a new language to TinyMCE]]> https://forums.modx.com/thread/45816/problem-in-adding-a-new-language-to-tinymce#dis-post-265247 Quote from: joeindio at Dec 23, 2006, 12:44 AM

Hi there,

I’m having the same problem in MODx 0.9.5. Apparently adding your language in the plugin doesn’t work - (the $tinymce_language handle doesn’t seem to be parsed correctly - it always defaults to english)

You will have to hardcode the language in the following line - in the plugin, inside the manager, NOT THE .tpl file!! (unless you’re doing this before an install, i guess...).

Just replace the sting {$tinymce_language} with your language code, e.g. "pt" for Portuguese


		  external_link_list_url : "{$base_url}assets/plugins/tinymce/modxLinkList.php",
		  remove_script_host : {$remove_script_host},
		  language : "pt", //< --- LINE TO CHANGE


Regarding your problem with the right align, can’t help you though. TinyMCE works OK for me. Have you tried reinstalling the plugin?

Hope this helps,

JP


thank you my friend for your help
i edited .tpl file and i did all of your points
but there wasn’t any change in tinyMCE  huh
i did this in Sitecache.idx.php and the language changed to persian  laugh wink
we want to offer this software to iranians but this process should be place in persian package
i cant use this in all of package because sitecache will make after installation  undecided
i hope coding team fix this problem soon
]]>
farhad Dec 22, 2006, 10:55 PM https://forums.modx.com/thread/45816/problem-in-adding-a-new-language-to-tinymce#dis-post-265247
<![CDATA[Re: problem in adding a new language to TinyMCE]]> https://forums.modx.com/thread/45816/problem-in-adding-a-new-language-to-tinymce#dis-post-265246
I’m having the same problem in MODx 0.9.5. Apparently adding your language in the plugin doesn’t work - (the $tinymce_language handle doesn’t seem to be parsed correctly - it always defaults to english)

You will have to hardcode the language in the following line - in the plugin, inside the manager, NOT THE .tpl file!! (unless you’re doing this before an install, i guess...).

Just replace the sting {$tinymce_language} with your language code, e.g. "pt" for Portuguese


		  external_link_list_url : "{$base_url}assets/plugins/tinymce/modxLinkList.php",
		  remove_script_host : {$remove_script_host},
		  language : "pt", //< --- LINE TO CHANGE


Regarding your problem with the right align, can’t help you though. TinyMCE works OK for me. Have you tried reinstalling the plugin?

Hope this helps,

JP
]]>
joeindio Dec 22, 2006, 06:44 PM https://forums.modx.com/thread/45816/problem-in-adding-a-new-language-to-tinymce#dis-post-265246
<![CDATA[Re: problem in adding a new language to TinyMCE]]> https://forums.modx.com/thread/45816/problem-in-adding-a-new-language-to-tinymce#dis-post-265245 ]]> farhad Dec 22, 2006, 01:39 PM https://forums.modx.com/thread/45816/problem-in-adding-a-new-language-to-tinymce#dis-post-265245 <![CDATA[Re: problem in adding a new language to TinyMCE]]> https://forums.modx.com/thread/45816/problem-in-adding-a-new-language-to-tinymce#dis-post-265244 ,
i renamed all of language files to "persian" word , example persian.inc.php , pe.js ; and i set them in plugin.tinymce.tpl file , now i have all of persian languages and i saved them in language folders.
i changed Language setting in manager>Tools>Site tab>Language to Persian and i changed Language setting in manager>Tools>Interface & Features>Front-end Editor Language to persian too.
but editor language didn’t change
i think this problem is in site’s cache
because i looked siteCache.idx.php file and my changes in plugin.tinymce.tpl didn’t apply in cache file , so i cleared cache , but those contents didn’t change
then i edited siteCache.idx.php file and i put
			case "persian":
			$returnlang = "pe";
			break;

in getTinyMCELang function and i changed
		  theme_advanced_toolbar_align : "left",

to right value , the toolbar aligned to right grin , but language is not persian yet rolleyes
Why ? huh]]>
farhad Dec 21, 2006, 10:23 AM https://forums.modx.com/thread/45816/problem-in-adding-a-new-language-to-tinymce#dis-post-265244
<![CDATA[Re: problem in adding a new language to TinyMCE]]> https://forums.modx.com/thread/45816/problem-in-adding-a-new-language-to-tinymce#dis-post-265243

Regarding the theme_advanced_toolbar_align variable, I’ll look into that further and will get back to you. I’m planning on doing some updating to the editor plugins so I’ll put that on my list. smiley]]>
Bravado Dec 21, 2006, 09:05 AM https://forums.modx.com/thread/45816/problem-in-adding-a-new-language-to-tinymce#dis-post-265243
<![CDATA[Re: problem in adding a new language to TinyMCE]]> https://forums.modx.com/thread/45816/problem-in-adding-a-new-language-to-tinymce#dis-post-265242 in pluin.tinymce.tpl we can choose toolbar align in TinyMCE
in this line
		  theme_advanced_toolbar_align : "left",


i changed it to right , but toolbar in editor didn’t align to right,
ok?]]>
farhad Dec 21, 2006, 05:55 AM https://forums.modx.com/thread/45816/problem-in-adding-a-new-language-to-tinymce#dis-post-265242
<![CDATA[Re: problem in adding a new language to TinyMCE]]> https://forums.modx.com/thread/45816/problem-in-adding-a-new-language-to-tinymce#dis-post-265241 farhad Dec 21, 2006, 05:20 AM https://forums.modx.com/thread/45816/problem-in-adding-a-new-language-to-tinymce#dis-post-265241