(Feature request) Language URL prefix or subdomain languages
When you build a site that is available in multiple languages you can create a /{language} folder for each language in order to set a certain language. This is nice if languages have different pages but when this is not the case you are duplicating your site multiple times which is error prone. It would be nice if you could set/use a language prefix for your site... This would mean that for instance /en/home is the English homepage and /nl/home is the Dutch homepage (both located in /home).
An alternative is that you use subdomains for different languages, but you can't set a 'default language' in dotCMS for a host or alias. This means that either you need to set up a rule (which doesn't work, see also https://groups.google.com/forum/#!topic/dotCMS/G6fcnOcrEwg) or some code in VTL/Plugin/Apache to set the language. It would be nice if you could set a default language in dotCMS for a particular host/alias.
This is achievable multiple ways:
- Setting a Rule
I just built a spanish page on
demo.dotcms.com/es/indexand created a rule which changes the language to spanish as soon as a user hits that page:

- using a tuckey rewrite rule See: https://dotcms.com/codeshare/set-language-by-site-or-folder?
Answered here:
https://github.com/dotCMS/core/issues/11403
On Wed, Apr 26, 2017 at 5:07 AM, Xander Steinmann [email protected] wrote:
When you build a site that is available in multiple languages you can create a /{language} folder for each language in order to set a certain language. This is nice if languages have different pages but when this is not the case you are duplicating your site multiple times which is error prone. It would be nice if you could set/use a language prefix for your site... This would mean that for instance /en/home is the English homepage and /nl/home is the Dutch homepage (both located in /home).
An alternative is that you use subdomains for different languages, but you can't set a 'default language' in dotCMS for a host or alias. This means that either you need to set up a rule (which doesn't work, see also https://groups.google.com/forum/#!topic/dotCMS/G6fcnOcrEwg) or some code in VTL/Plugin/Apache to set the language. It would be nice if you could set a default language in dotCMS for a particular host/alias.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dotCMS/core/issues/11403, or mute the thread https://github.com/notifications/unsubscribe-auth/ABfteOnI_eyAGHzw1Qb3eazxNg0oUF3hks5rzwlhgaJpZM4NIkn7 .
--
3059 Grand Avenue Suite 410-B Miami FL 33133 Main: 305-900-2001 | Direct: 978.294.9429
[email protected] | dotcms.com http://www.dotcms.com/
https://twitter.com/dotcms http://www.linkedin.com/company/dotcms https://plus.google.com/+Dotcms https://www.facebook.com/dotCMS