How do I change the language of the titles and descriptions of products in Reflow? Also, how can I make it change when I press a button in BSS? I’ve tried following this guide, but I don’t understand how to implement it. I would really appreciate it if there’s a guide out there on how to do this.
It’s kind of frustrating to me how this is not well covered as localization is probably the most important thing for websites. Maybe not in the US as much as in Europe but still. Why is this not easy to implement without having to duplicate a bunch of stuff or use google translate?
Thanks, but this only answers half of my question. For example, how do I know what the name of each ‘key’ is in JSON for the different product texts? And how can I allow the user to switch between languages? Thanks.
The localization.json file will change the entire user interface of Reflow components, including labels, text prompts, and error messages. If your site is in Spanish, you would include your Spanish localization.json file, where you have translated the values to Spanish, not the keys. You would include the JSON file as I showed you above.
If your store is in Europe and you want to target only countries that use the euro as currency, you only need one store. You can include a localization.json file translated into French for your French site, which could be hosted at fr.example.com, or translated into Spanish for your Spanish site, hosted at es.example.com. However, if you also want to target Denmark, you’ll need two stores due to the currency difference. The store for Denmark would display prices in DKK instead of euros, and you would use a localization.json file translated into Danish, which could be hosted at dk.example.com. When a user selects a language, you can link them to the appropriate site in that language.
The problem I have with this is that everything is duplicated. If I need to change the price or description of one product, I would need to do it again for the same product in the other languages, right? Honestly, it’s quite stupid to have different subdomains for different languages when you could just as easily translate it with JavaScript by applying a .json file (which is what I do for my websites but can’t with ReflowHQ elements). I guess it is not well implemented with ReflowHQ yet…?
If you think it’s unnecessary to have subdomains for your site in different languages, you can use your JSON file to translate your site. However, only the first language can be indexed by search engines. Keep in mind that products with different names are not considered the same products.
Ok. So if I need to make duplicates is there at least a simple way to share all the assets js/images etc… between them so it dosen’t need to load multiple times for the user when switching language?
I use reflowHQ that’s where the products are, are you seriously telling me there are no way to translate this other than making duplicates and sorting them into categories? If that is the case with only 30 products I would need to make 90 products, 3 times the work for three languages!!
I make all the APIs, for that I use directus which makes the whole process easier for you, in addition to storing the images of the products it also provides you with the APIs for loading the products indicating for example name, description, currency, price, etc.
The good thing is that the tool allows you to integrate everything in a single tool, for me it is the ideal complement in bootstrap studio, we already have many products in production, with both technologies.