I’m building a site which is made up of a number of sub-sites (collection of MODx resources), and I’ve been asked if I can translate one of them into Turkish. Is it possible to set up YAMS to put the alias *down* a branch rather than at the site root?
e.g. if MODx is installed at
http://example.com/, then to have
http://example.com/projects/modx/en, rather than
http://example.com/en/projects/modx ?
The rest of the site will remain in English alone, so it’s only resources at and below projects/modx which need to appear in two languages.
Thanks for your advice.
-
- 805 Posts
It’s possible to physically move a MODx installation to a subdirectory (called projects/modx here) on your server, provided you set the Modules>YAMS>Other Params>MODx Subdirectory parameter (to projects/modx). The URLs will then look like:
http://example.com/projects/modx/en
Hope that helps.
Thanks PMS - the MODx install must stay in the root directory to power the rest of the site, so I was hoping there’d be some other setting to get YAMS to move the /en/ or /fr/ to (say) the third parameter down the URL.
If not then they’ll have to live with it as-is!
-
- 805 Posts
That’s not possible I’m afraid. You can of course have most of the site monolingual, with only certain documents (templates) multilingual... but it’s not possible to have the root name anywhere apart from the root.
I’ll have to check to be sure, but I think it should be possible to make the root name for English empty so that only the Turkish variants have a root name, provided your multilingual document aliases are unique. I don’t know if that helps you at all.
-
- 28 Posts
Did anyone find out if its possible to do this? This is what I am looking for, to have the en just use the default text and only the other languges be in in the sub domain eg. fr/home.html where default would be /home.html,
Chris,
-
- 805 Posts
Yes. It’s possible. Please see
the documentation.
-
- 28 Posts
Thanks for the reply, I just tried it and I am getting an error page saying it cannot redirect,
I have taken the en/ off in the YAMS config from the language root and left the fr/ in and taken en/ off the htaccess but it is not redirecting to the right page, I would really appreciate anyones help.
Also after making en default I have en boxes for the pages to fill in but the english is already in the default text boxes,
Chris,
-
- 28 Posts
I have changed the htaccess to this:
RewriteCond ${REQUEST_FILENAME} !-f
RewriteCond ${REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1&yams_lang=en [L,QSA]
And it is showing the index.php but the stylesheet does not seem to be working, so I am thinking that it is trying to be in the sub "en" folder somewhere,
Chris,