I’m translating my app using “App Text”.
But how do I translate complet texts into multiple languages like blogs for example?
Data Type: “Blog”, 1 of the field is “Text”.
“Text” is the complet blog.
I have a RG with all the blogs and a page where the data from the cell clicked inside the RG is being send to.
How do I translate that text? Can’t use App Text I think.
Great question! When it comes to translating dynamic content like blogs or any other text field within a Data Type, using the built-in “App Text” feature might not be the best solution since it caters more towards static UI texts.
One approach to translating the complete blog text would be to create a separate Data Type specifically for translations. Let’s call it “Blog Translation”. This Data Type would have a field for the translated text, the language, and a reference field that points to the original Blog.
Here’s a step-by-step guide on how you can set this up:
-
Create a new Data Type named “Blog Translation” with fields:
- Translated Text (type: text) - stores the translated blog text
- Language (type: text or dropdown) - specifies the language of the translation
- Original Blog (type: Blog) - references the original blog post
-
In the Data Type “Blog”, add a field named “Translations” (type: List of Blog Translation) - this field will store all the translations for a specific blog post.
-
Whenever you want to add a translation for a blog, create a new Blog Translation object and set the Translated Text, Language, and Original Blog fields accordingly.
-
On the page where the blog post is displayed after clicking on a cell in the repeating group (RG), you can retrieve the translation based on the user’s selected language. Here’s an example of how to do that:
- Create a workflow event when the cell is clicked, and pass the blog’s unique identifier to the destination page through a URL parameter or custom state.
- On the destination page, retrieve the original blog post using the identifier.
- Use a “Do a search for” action to find the corresponding translation for the selected language and the original blog post reference.
- Display the translated text on the page using the retrieved translation.
By following this approach, you’ll be able to store and retrieve translated versions of your blogs while maintaining a clear association between translations and the original content.
Thanks for the great explanation.
Could it be possible to create an app text “Blog 1”
Save “Blog 1” as blog content in the Data Type “Blog”.
Then in the language field write the complete blog in each translation for Blog 1 and then do app text blog 1 in the text field where the blog content needs to go on the dynamic page?