<![CDATA[ Multilingual web-project with Revolution: best practice! - MODX Community Forums]]> https://forums.modx.com/thread/?thread=51032 <![CDATA[Re: Multilingual web-project with Revolution: best practice!]]> https://forums.modx.com/thread/51032/multilingual-web-project-with-revolution-best-practice?page=3#dis-post-432584
For me most important was to put the BaseUrl correctly in the settings for the specific Media Source (Modx->Tools->Media Sources).

If nothing helps you out, you can make a hack to tinyMCE to make image urls relative to the Context in TinyMCE.
In /core/components/tinymce/tinymce.class.php i added one line to put the Context base_url in:
line 37:
if(@$this->context->getOption('tiny.base_url')!='') $this->config["baseUrl"]=$this->context->getOption('tiny.base_url');

In your context you can now use a key 'tiny.base_url' to set your Context dependent base_url.

In my settings I have the tinyMCE path set to rootrelative.

Rgs.,


Danny
]]>
dannygorter Aug 08, 2012, 02:36 AM https://forums.modx.com/thread/51032/multilingual-web-project-with-revolution-best-practice?page=3#dis-post-432584
<![CDATA[Re: Multilingual web-project with Revolution: best practice!]]> https://forums.modx.com/thread/51032/multilingual-web-project-with-revolution-best-practice?page=3#dis-post-299686
But I am not sure if I actually understand what all is going on. I’m pretty new to REVO and contexts. I’ve been holding off from Revo until I can find a way to customize the install so that it includes pages, files, chunks, etc. that are part of each site I build.

Well, this project came up so I am taking the opportunity to get acquainted with REVO.

I guess my question is: Now what? Assuming everything is set up properly, what’s the next step? Do I mirror the ’web’ context over to ’no’ (norwegian), or only the actual pages that are or will be translated; I have a 150 page site but only a handful of the pages are actually going to be translated. Do I only build out those pages on the Norwegian side? Does ModX automatically route browser to the right place? How exactly is that working in the background? How does it know when to serve a translated page. Do I supply a link to it or does it serve pages depending on your location?

Let me stop with the questions for now! Thanks in advance for any replies.]]>
SpaceCity Jan 25, 2011, 08:34 AM https://forums.modx.com/thread/51032/multilingual-web-project-with-revolution-best-practice?page=3#dis-post-299686
<![CDATA[Re: Multilingual web-project with Revolution: best practice!]]> https://forums.modx.com/thread/51032/multilingual-web-project-with-revolution-best-practice?page=3#dis-post-299685

Multilingual Websites with MODx and Babel (domain based)
SEO Friendly Multilingual Websites with MODx and Babel (folder based)]]>
mikrobi Jan 20, 2011, 01:57 AM https://forums.modx.com/thread/51032/multilingual-web-project-with-revolution-best-practice?page=3#dis-post-299685
<![CDATA[Re: Multilingual web-project with Revolution: best practice!]]> https://forums.modx.com/thread/51032/multilingual-web-project-with-revolution-best-practice?page=3#dis-post-299684
some advertising for my multilingual plugin based on contexts:
http://modxcms.com/extras/package/?package=757

Babel creates linked documents cross different contexts. So you can easyly navigate through your translations. You can also configure the template variables (TV) you want to «follow» when saving the document in the main context. For example, when you modify the value of a TV in the ’web’ context, modifications will also occur in the other contexts.

please test it, love or hate it, and comment here:
http://modxcms.com/forums/index.php?topic=57291


]]>
saerni Nov 16, 2010, 06:55 AM https://forums.modx.com/thread/51032/multilingual-web-project-with-revolution-best-practice?page=3#dis-post-299684
<![CDATA[Re: Multilingual web-project with Revolution: best practice!]]> https://forums.modx.com/thread/51032/multilingual-web-project-with-revolution-best-practice?page=3#dis-post-299683 I have setup a multilingual web projet in Revo with the following params :
url : http://mydomain.com/en
context : en
base_url:{base_url}en/
site_url:{site_url}en/

url : http://mydomain.com/fr
context : fr
base_url:{base_url}fr/
site_url:{site_url}fr/

My images are located in /assets/images/ .
In TinyMCE, when I try to insert an image in a document, the url generated is assets/images/myimage.jpg when tiny.path_options is set to "docrelative". When path_options is set to "rootrelative" the generated url is /assets/components/tinymce/assets/images/myimage.jpg.
What params do I have to change in TinyMCE and/or in the contexts to have /assets/images/myimage.jpg generated ?

Regards

Update
In tinymce.class.php, line 141, we have
$this->properties['document_base_url'] = $this->config['assetsUrl'];

where $this->config[’assetsUrl’] is defined by
$assetsUrl = $this->modx->getOption('tiny.assets_url',$config,$this->modx->getOption('assets_url',null,MODX_ASSETS_URL).'components/tinymce/');

To solve my problem, I had to change line 141 by
$this->properties['document_base_url'] = $this->modx->getOption('tiny.document_base_url',$this->properties,'');

Any feedback on this is appreciated.]]>
kamalito Nov 11, 2010, 06:12 AM https://forums.modx.com/thread/51032/multilingual-web-project-with-revolution-best-practice?page=3#dis-post-299683
<![CDATA[Re: Multilingual web-project with Revolution: best practice!]]> https://forums.modx.com/thread/51032/multilingual-web-project-with-revolution-best-practice?page=3#dis-post-299682 sottwell Oct 09, 2010, 01:14 AM https://forums.modx.com/thread/51032/multilingual-web-project-with-revolution-best-practice?page=3#dis-post-299682 <![CDATA[Re: Multilingual web-project with Revolution: best practice!]]> https://forums.modx.com/thread/51032/multilingual-web-project-with-revolution-best-practice?page=3#dis-post-299681
http://github.com/modxcms/revolution/commit/01c5648629e8f51197f4f004b9fdf9cb2a0dd9e1#diff-1]]>
sottwell Oct 08, 2010, 10:54 AM https://forums.modx.com/thread/51032/multilingual-web-project-with-revolution-best-practice?page=3#dis-post-299681
<![CDATA[Re: Multilingual web-project with Revolution: best practice!]]> https://forums.modx.com/thread/51032/multilingual-web-project-with-revolution-best-practice?page=3#dis-post-299680 sottwell Oct 08, 2010, 10:04 AM https://forums.modx.com/thread/51032/multilingual-web-project-with-revolution-best-practice?page=3#dis-post-299680 <![CDATA[Re: Multilingual web-project with Revolution: best practice!]]> https://forums.modx.com/thread/51032/multilingual-web-project-with-revolution-best-practice?page=3#dis-post-299679 http://bugs.modx.com/]]> splittingred Oct 08, 2010, 08:34 AM https://forums.modx.com/thread/51032/multilingual-web-project-with-revolution-best-practice?page=3#dis-post-299679 <![CDATA[Re: Multilingual web-project with Revolution: best practice!]]> https://forums.modx.com/thread/51032/multilingual-web-project-with-revolution-best-practice?page=2#dis-post-299678 sottwell Oct 08, 2010, 03:06 AM https://forums.modx.com/thread/51032/multilingual-web-project-with-revolution-best-practice?page=2#dis-post-299678