Auth0 Angular 10
Apex Designer Documentation
What's New
Getting Started
Projects
Business Objects
Processes
User Interfaces
App Behaviors
Files
Dependencies
Project Settings
Libraries
Patterns and Best Practices
App Showcase
Angular 10 Base Library
Frequently Asked Questions

DeepL Translation Library

Provide dynamic translation of your application user interface via the Deepl API

Blank Profile Image
Written by Kyle Hoskins
Updated 21 minutes ago
Less than a minute read

The Apex Designer DeepL Translation Library adds the power of the DeepL Translate API to your application to offer multiple language support.  The library handles caching, both system and user input translations, and toggling between languages.

Implementation

Translate text that developers have added in Apex Designer ("system text") using the text() method from the translate service.  For translating HTML, simply use translate.html("<p>string to translate</p>")

If your application displays dynamic text or html that is provided by a user, you can use translate.providedText() or translate.providedHTML().  These functions are particularly useful when the user is providing content in a language different than the Apex Designer developers supply the "system text."

When your application is loading, or when the preferred language is toggled, be sure to call setCurrentLocale(languageAbbreviation) - (ex: EN, FR).  If you have user provided content in a different language, you can specify a second locale using setUserProvidedContentLocale("EN").

To void a flash of content while translations are loading, you can use the conditional:

if (translate.isInitialized | async) == true

 

 

 

Powered by Apex Designer
Terms of ServicePrivacy Policy
© 2017-2024 Apex Process Consultants