On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • hello
    i translated english languages of TinyMCE to persian language
    ok
    i add them , and i edit pluin.tinymce.tpl like this

    if (!function_exists('getTinyMCELang')) {
    	function getTinyMCELang($lang){
    		switch($lang){
    			case "farsi":
    			$returnlang = "fa";
    			break;
    
    			case "english":
    			$returnlang = "en";
    			break;
    			
    			case "finnish":
    			$returnlang = "fi";
    			break;
    


    but farsi language didn’t appear in TinyMCE , please help me
    • I got the same problem with Russian language undecided

      To completely translate the TinyMCE, theoretically, one need to create:
      1) so called "shared language file" (/tinymce/jscripts/tiny_mce/langs/[your_country_language_code].js);
      2) all needed "theme specific language files" (/tinymce/jscripts/tiny_mce/themes/[theme_name]/langs/[your_country_language_code].js);
      3) "plugin specific language files" for all installed plugins (/tinymce/jscripts/tiny_mce/plugins/[plugin_name]/langs/[your_country_language_code].js).

      After that, also theoretically, creating entry for your language in plugin.tinymce.tpl should enable the localized TinyMCE interface.

      But it don’t sad
      • yes , i translated all of them and i edit tpl file , but it don’t
        • another problem is in toolbar align,
          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?
          • The language settings in TinyMCE are completely dependent on the Language and Front-end Editor Language settings in the main configuration of the manager. There isn’t anything that allows you to select a language from within a TinyMCE instance just yet. So if you have a manager language file setup for Farsi and the value of the language variable is "farsi" then it would work. I should probably set something up that allows for setting languages independently of the manager...but I figured that if you want to have Farsi or any other language available on the front-end then surely you’d want to have it in the manager as well. Hope this explains it better. smiley

            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
              Jeff Whitfield

              "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
            • thank you Bravado for your reply wink,
              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
              • huh
                • 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
                    Got Music? Try XSPFjukebox - Skinnable MODx Media Player
                  • 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
                    • this is my changes in Tinymce
                      1- change to RTL direction
                      2- change to persian language
                      3- change to right align toolbar
                      wink