Jump to content

Multiple-site support and site translations


kunago
 Share

Recommended Posts

I followed the steps to use multiple-site in Processwire: https://processwire.com/docs/more/multi-site-support/ It works excellent but has issue with translations.

It is easy to clone a production site to a dev site, simply duplicating the "site" dir to a "site-dev" dir. Then one needs to clone a database and that is it. Except for one thing - translations. Those are stored in assets/files/<language_id> with file names including the "site" (presuming I cloned the "site" dir). That can be for instance "site--templates--content--home-php.json". While working with the production site, everything looks great; once I use the dev site, I need to rename these files manually to "site-dev--templates--content--home-php.json" so Processwire can pick up the translation.

I also noticed this while looking at the translations:

image.thumb.png.8cf6617c419cffbdca7a877e7f0ff640.png

The "-dev" at the beginning. Maybe trimming that would be more readable?

 

I am not sure what solution would be the best here. Maybe having some variable in the LanguageSupport module that would allow ProcessWire to look for translation files with a different "site" name? Or a batch rename as the "site-" is always obligatory in order to use multiple-site feature?

image.png.1691efa0c7e74c4b83afd2bf0cd8699f.png

Maybe I missed someting though and there already is a setting for this though.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...