Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

How to set the website to run on two domains in different languages?

Started by Peter Simkovic 8 months ago · 4 replies · 69 views
8 months ago

Hi guys, I am running a website in two different languages. I use langswitcher plug-in to switch between these two languages and everything is working fine. Anyway, I want to buy a domain in a country of the second language to redirect to my website (e.g. mydomain.tld/en) to be easily searchable and visible in that country. Is it possible to setup the website the way it all appear to be run second language domain (not only to redirect)?

👍 1
8 months ago

is this example correct?
when en is clicked you want it show my-en-site.com
when fr is clicked you want it show my-fr-site.com
and you want to manage those together from one grav?

👍 2
8 months ago

so how about something like this for links?
Multi-language links in Agency Theme

in addition to it we would just add something like this

TWIG
if active language is en domain = 'https://me-en-site.com'

if active language is fr domain = 'https://me-fr-site.com'

{{ domain ~ 'NAV1.URL'|t }}

to manage both domains, we can try using symlink somehow. i didnt try yet.

👍 1
8 months ago

i just tried symlink for public-html folder and it works :)

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 54 12 hours ago
Support · by Anna, 3 days ago
2 60 15 hours ago
Support · by Justin Young, 16 hours ago
1 30 15 hours ago
Support · by Duc , 1 week ago
2 65 5 days ago
Support · by Colin Hume, 1 week ago
2 57 5 days ago