Multi-language using external service

Hi there,

For other projects (using custom front-ends) I am using localazy.com to manage my translations. With this platform it is possible to manage alle translations in a very efficiënt way and structure these by keys.

The front-end can acquire these translations via a json asset file or via CDN.

I am wondering if it possible to use locallazy in combination with the multi-language setup within Weweb. And if so I would like to have some insight in the best practice to do so.

I am now thinking about a way to load the translations into a weweb page, and then I want to bind each translation of that key to the corresponding language field in weweb.

Or is it possible to just use one languane in weweb and let the integration with locallazy perform the translations.

Is there someone who has experience with this?

For now, you would either bind your data yourself when you download the translations from your CDN/API, or an idea that comes to my mind to automate this, is to create a custom formula, this way you would be binding it only once, instead of for each language. You would need to define a key in this formula, and pass the current language. This way you avoid doing a lot of binding. I’d need to see a diagram or something of how it works to be able to propose a better tailored solution.

Thanks. I will try something out. Is it possible to:

  • add the specific json files for each language as an asset in Weweb
  • select the correct json file based on the language you use from url
  • bind the values to element based on the key?
  1. You would need to store this in a variable as JSON, an alternative I can think of, is fetching this on page load from the API/CDN. You theoretically could store the files also, but there is a thread where we discussed this, and we came to a conclusion that instead of files, it’s the same to use variables.
  2. You could do this with the variables, or just have one huge variable with all the languages.
  3. Yes, you can do this, depending on how much automation you want you can either use the built-in WeWeb’s functionalities, or make your own workarounds (e.g. formulas) to suit your needs, and access the data however you need it.

Thanks again. Great stuff to try out. I anoter topic tegarding drop down options there was an undocumented feature yhat when the name property is object that will be translated. Like:

{value:1,
name:{en: Dutch,
nl: Nederlands}
}

Does this also work with other elements like text or input field placeholders?

I think it’s not automatic, but you could make a formula to pick the en/dutch based on a variable, instead of binding it manually.

1 Like