Multilang local and production configuration

HI !

Follwing this doc https://learn.getgrav.org/content/multi-language#environment-based-language-handling, I try to configure multilang based on environment.

According to the documentation, I created the following folders :

  • /user/fr.mysite.com/config/system.yaml
  • /user/en.mysite.com/config/system.yaml

That works fine !

But, what if I want to use the same configuration for both :
fr.mysite.local (for development) and fr.mysite.com (in production).

I would like not to duplicate the folders in user… Is it possible ?

Thanks you

Did you consider the idea of using a symbolic link?

Yes, but I already use symlinks for plugins and themes in my multisite config.
Looks like this :

sites
    site_1
        config
        pages
        plugins (symlink  to user/plugins)
        themes (symlink  to user/themes)
    site_2
        config
        pages
        plugins (symlink  to user/plugins)
        themes (symlink  to user/themes)

If I want multilang to work inside this config, I have to add the following folders :

sites
    site_1
        config
        pages
        plugins (symlink   to user/plugins)
        themes (symlink  to user/themes)
        fr.site1.local
        en.site1.local
    site_2
        config
        pages
        plugins (symlink  to user/plugins)
        themes (symlink  to user/themes)
        fr.site2.local
        en.site2.local

Using symlinks here would say have this kind of structure :

sites
    site_1
        config
        pages
        plugins (symlink  to user/plugins)
        themes (symlink  to user/themes)
        fr.site1.local
        en.site1.local
        fr.site_1.com (symlink to fr.site_1.local)
        en.site_1.com (symlink to en.site_1.local)

I’m pretty sure it would works, but it’s very confusing. And then, what if I have 10 sites with 10 different languages ?

Do you mind another solution ?

mutlisite with multilanguage is going to be confusing no matter what you do! it’s really a matter of picking the solution that works best for you.