Not sure how to title my issue.
I have a Wordpress website, where most values are stored in custom fields and is very independent of language - e.g. most values are numbers.
Instead of creating a multi-site with several network sites, I am looking for a much simpler solution. Let's say I want to create a German version. Then ideally, I could redirect all German users accessing the site with /de/
to a German version of the theme.
E.g.: http://www.example.com/post-name/
directs to single.php
in the theme files http://www.example.com/de/post-name/
directs to single-de.php
in the theme files. So they will have the same content, but the translation will be in the theme file.
The only problem I can see is the canonical URL, but I am guessing this can be dealt with as well. So my question is, is it possible to redirect all users that go to /subfolder/post-name/
to a specific theme file and display the content of that post with the specific theme file?
Is there any solution I have missed that might be easier?
My solution above would only require redirects and some additional theme files instead of creating a completely new multi-site and importing everything and having to keep this site updated as well.
There is already wp logic to do theme translations, so you don't need to re-invent that. If your content is in the theme or is the same for all languages (eg the numbers), then the translations should work well for this.
One can set WP-LANG dynamically. Viper's https://wordpress.org/plugins/in-their-language/ tries to do that automatically for admin area (not sure if it still works), or/and you could add a language switcher. Fairly easy, there's a variety out there https://www.google.com/search?q=wordpress+language+switcher.
this is an answer to
Is there any solution I have missed that might be easier?
not an answer to
So my question is, is it possible to redirect all users that go to /subfolder/post-name/ to a specific theme file and display the content of that post with the specific theme file?