Hey y’all has anyone build fully translatable pages in Nordcraft before? I’m NOT talking about duplicating or using a JSON as variable.
I mean using an external API to get Key and Values for translation fields.
What we tested: generate a unique hash based on the text and use this as identifier to send Strings to our backend via Custom Actions and get the translation JSON for each page SLUG on request and ServerSide rehash each text field to get the corresponding value from the JSON.
PROBLEM: to get an unique & safe hash we have to scramble base62 strings and different ServerSide function nodes together. This uses (obviously a lot of calculation time) on moderate sites we see a spike in response times from 60ms to almost 400 - 800 ms (without the external api request) just calculating the individual hashes.
Furthermore we have still problems translating inline elements such as <b> as we cannot inject the whole html element just text.
Does anyone here have an idea how to solve this?
Alternative would be to manually tag each field and create translations manually. Then we could (sort of) combine different translation keys together to an key group on our backend.
Example:
Is (this ist bold) the right (this is again normal text) way?
Translation Group xy: Key „Is“ , Key „the right“ , Key „way?“
We then would use DEEPL API with context to translate these three parts.
Any thoughts & help appreciated