Support for multilingual sites in Backdrop has improved significantly in recent years, including with the work on i18n.
However, in practice, problems often arise with multilingual sites. This is also a frequently discussed topic in the forum.
Specifically, I am currently having trouble developing a multilingual site with Ubercart.
Ubercart works as a stable platform for an e-commerce store with Backdrop, but adding an additional language encounters many problems:
- Translating fields in the checkout form
- Translating messages sent by email
- Translating instructions when ordering and in the cart
The problem is that these texts are hard-coded in the module, do not use the translate (t) function and cannot be translated by translating the interface.
So I I came up with the idea to experiment with the possibility of solving all these problems by creating a multisite with subdomains for different languages (now I have to make a site in two languages) - with two separate databases and settings, but a common core and system modules for easy maintenance.
I would be grateful for an opinion on whether this is possible and if possible - advice on how to do it.
I mean the use of the sites folder inherited from Drupal 7 for the purpose of developing multiple sites with a single installation of the system.
Comments
I didn't know there were so many untranslated strings in ubercart. Maybe the easiest would be to make a PR to ubercart to get those translated. Assuming there are no problems with that.
Create an issue https://github.com/backdrop-contrib/ubercart/issues here. And identify the strings that need to translated. If you're able to create a PR even better.
Thanks for the quick response. Unfortunately I can't offer a PR - I'm not a coder, I'd say a designer and copywriter who also develops websites.
I'm not sure I can formulate the problem correctly according to github standards, but I can describe it with free forum text.
It's not about translating strings - where there are strings with (t), they are easily translated via admin/config/regional/translate
However, the settings that are in the message fields of admin/store/settings/checkout/settings are not subject to translation. This can be solved by a custom block instead of these messages
But the big problem is with translating the address fields - admin/store/settings/countries/fields - another example of a problem that I can't find a solution for translating into multiple languages.
Email messages sent to the administrator and buyer are also not subject to translation.
I have made edits to the template by manually replacing the text with a language other than English and this works for a monolingual site, but for a multilingual one I don't know what to do because the template for these messages is one, for example uc-order--admin.tpl.php - I place the edited template in the theme folder, but this is only one language, it is not multilingual.
I thought that in Drupal 7, Variables from i18n was responsible for most of this, but such a module is not available for Backdrop and I guess it is technically impossible to implement.
Today I successfully installed a multisite and am testing the ability to have both languages work on two different subdomains - using same core, modules and layouts and theme.
This would also solve other problems, for example, translating terms in a taxonomy does not always work easily and smoothly. In such a scenario, each of the sites is actually monolingual and nothing needs to be translated, you just work with one main language, and switching can be done with hyperlinks in the content and navigation.