Back to Multi Domains Support

tomas.contos36976
tomas.contos36976

Hi,

I have one OctoberCMS installation with multiple languages set up using Translate plugin. I am looking for plugin which will help me achieve as follows :

  • each language version of page will have own domain , example : www.xyz.co.uk , www.xy.de , www.xy.cz .....
  • each CMS page has only once on server (only one .htm) and I will leave Translate plugin to look after translations. Will your plugin help me handle multiple domains as describe above ?
Linkonoid
Linkonoid

tomas.contos36976 said:

Hi,

I have one OctoberCMS installation with multiple languages set up using Translate plugin. I am looking for plugin which will help me achieve as follows :

  • each language version of page will have own domain , example : www.xyz.co.uk , www.xy.de , www.xy.cz .....
  • each CMS page has only once on server (only one .htm) and I will leave Translate plugin to look after translations. Will your plugin help me handle multiple domains as describe above ?

Hi!

1) The easiest way to do this is to bind different domains to the same theme/page (all of them will link to one page) and on this page process the input request ($ _SERVER ['REQUEST_URI']) by the domain name and depending on name show text in the appropriate language (or redirect). But in this variant the same will work without the use of a plugin (it is enough to register virtual domains and all of them will link to one page).

2) The path is a little more difficult, with the rework of the plugin (still need to register the virtual domains on the hosting). What I mean. You need to bind of the domain to the language on the page ("page/:lang"). In the existing version of the plugin there is a strict binding: domain -> theme/page (with suffixing or passing a GET-request, but they are not suitable for your case) If I understand correctly, then you need a "bare" domain to match the language of the "www.xyz.co.uk" without additional parameters. To implement this functionality, it will be necessary to introduce variable presets at the plugin level for each bind, i.e.  on the page "page/:lang" will be the substitution of the parameter with the value of the language, ie "www.xyz.co.uk" -> "page/en" given the value of the parameter lang = 'en' specified in the bind. This new option will allow to create fully multilingual sites (it will be enough to choose a theme and the parameter will be inserted on all pages).

Last updated

Linkonoid
Linkonoid

Plugin update to v1.2.0. Added Redirect, Presetting params and Prefix for Page Url. Updated replacer Router.php for "hard mode".

1-3 of 3