Reference17:Concept App Service Translations: Difference between revisions

From innovaphone wiki
Jump to navigation Jump to search
Created page with "Apps Category:Concept App Service Translations == Applies To == * innovaphone from version 14r2 == Overview == The idea of the translations App is to provide an interface for other Apps to translate user content on-the-fly. So other apps can integrate the translation service via the [https://sdk.innovaphone.com/15r1/web1/com.innovaphone.translation/com.innovaphone.translation.htm local JavaScript API] in the client and thus offer the user tran..."
 
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:Concept|Apps]]
[[Category:Concept|Apps]]
[[Category:Concept App Service Translations]]
[[Category:Concept App Service Translations]]
== Applies To ==  
== Overview ==
The idea of the translations app is to provide an interface for other apps to translate user content on-the-fly. So other apps can integrate the translation service via the [https://sdk.innovaphone.com/16r1/web1/com.innovaphone.translation/com.innovaphone.translation.htm local JavaScript API] in the client and thus offer the user translated texts.


* innovaphone from version 14r2
The service serves as a proxy and integrates a corresponding backend. This means that you need your own account at the external translations service and can configure your credentials in the Settings App.


== Overview ==
== Supported translation services ==
The idea of the translations App is to provide an interface for other Apps to translate user content on-the-fly.
You can configure multiple translation backends and switch between them.
So other apps can integrate the translation service via the [https://sdk.innovaphone.com/15r1/web1/com.innovaphone.translation/com.innovaphone.translation.htm local JavaScript API] in the client and thus offer the user translated texts.


The service serves as a proxy and integrates a corresponding backend. This means that you need your own account at the external translations service and can configure your API key in the PBX Manager for this app service.
=== DeepL ===
This interface uses the https:///www.deepl.com translation API.


=== deepl.com ===
This interface is used as the default interface. you dont must provide an ''API-URL'' in the [[Reference16r1:Apps/PbxManager/App Translations|Settings]]. A custom API-URL is only for a local version with the same API interface.
This is interface is used as default interface if you dont provide an ''API-URL'' in the [[Reference16r1:Apps/PbxManager/App Translations|Settings]].


;Privacy
;Privacy
Line 21: Line 21:
:https://www.deepl.com/de/pro#developer
:https://www.deepl.com/de/pro#developer


=== Custom backends ===
==== Technical Concept ====
You are able to provide your own translation backend by configuring an ''API-URL'' in the [[Reference16r1:Apps/PbxManager/App Translations|Settings]]. For this, it is important that your backend act in the same way as the deepl.com interface.
 
* The DeepL API is a synchronous HTTP flow. This means that we request a translation and get an instant response with the translation.
* Outgoing HTTP(S) request to the DeepL API
* If you not override the URL, it is used HTTPS only
 
=== EU - eTranslation ===
This interface uses the EU service eTranslation.
 
European Commission’s free and secure AI language tools: https://translation.ec.europa.eu/tools-and-resources/ai-translation-and-language-tools_en
 
Technical Documentation: https://language-tools.ec.europa.eu/dev-corner/etranslation/rest-v2/text
 
==== Technical Concept ====
* The EU-eTranslation uses an asynchronous HTTP flow with webhooks to deliver processed translations
* Translation flow
*# On every app startup
*## a dynamic user / password combination is created, which will be used for later secure incoming webhooks
*### Example: <code>23bcf2fd / 19ccf70b-028c-e7a8-94eb-1ad7db91d4c8</code>
*## the own app url is generated from the current environment
*### Example: <code><nowiki>https://23bcf2fd:19ccf70b-028c-e7a8-94eb-1ad7db91d4c8@apps.slu.de/slu.de/translations/webhook-basicauth</nowiki></code>
*# Outgoing HTTPS request to the eTranslation Service. The translation job will be queued. As additional information in the job, a callback webhook URL with a username and password will be placed.
*# If the processing is finished, a webhook to the app is delivered via HTTPS
*# The job result will be processed and delivered back to the user that has requested the translation
==== Limitations ====
* 50 concurrent translation requests
* 5.000 characters per translation


== Licensing ==
== Licensing ==
Line 28: Line 53:


== Installation ==
== Installation ==
Go to the PBX manager and open the '''"AP app installer"''' plugin. On the right panel, the App Store will be shown. ''Hint : if you access it for the first time, you will need to accept the "Terms of Use of the innovaphone App Store"''
Go to the PBX manager and open the '''"AP app installer"''' plugin. On the right panel, the App Store will be shown.
* In the search field located on the top right corner of the store, search for '''"Translations"''' and click on it
* In the search field located on the top right corner of the store, search for '''"Translations"''' and click on it
* Select the proper firmware version, for example '''"v15"''' and click on install
* Select the proper firmware version and click on install
* Tick "I accept the terms of use" and continue by clicking on the install yellow button
* Wait until the install has been finished
* Close and open the PBX manager to refresh the list of the available colored AP plugin
* Close and open the PBX manager to refresh the list of the available colored AP plugin
* Click on the '''"AP Translations"''' and click on '''" + Add an App"'''
* Click on the '''"AP Translations"''' and click on '''" + Add an App"'''
* Enter a '''"Name"''' that is used as display name ''(all character allowed)'' for it and the '''"SIP"''' name that is the administrative field ''(no space, no capital letters)''. ''e.g : Name: Translations, SIP: translations''
* Enter a '''"Name"''' that is used as the display name ''(all characters allowed)'' for it and the '''"SIP"''' name that is the administrative field ''(no space, no capital letters)''. ''e.g : Name: Translations, SIP: translations''
* Tick the appropriate template to distribute the App (the app is needed at every user object from any user who wants to use the translation API)
* Tick the appropriate template to distribute the App (the app is needed at every user object from any user who wants to use the translation API)
* Click OK to save the settings and a green check mark will be shown to inform you that the configuration is good
* Click OK to save the settings and a green check mark will be shown to inform you that the configuration is good


== Translation - Client ==
== Translation - Client ==
There is no view/app that the user can explicitly open. The service runs in the background and has no UI and can be integrated by other apps.
There is no view/app that the user can explicitly open. The service runs in the background and has no UI and can be integrated by other apps. In order for the user to have access to the translation service, their user object must have access to the app object of the translations app.
In order for the user to have access to the translation service, their user object must have access to the app object of the translations app.


The client side of the app service receives requests from all other apps via the local JavaScript API and sends them to the service. The result of the request is returned to the original app via the local JavaScript API
The client side of the app service receives requests from all other apps via the local JavaScript API and sends them to the service. The result of the request is returned to the original app via the local JavaScript API
Line 52: Line 74:


=== Language recognition ===
=== Language recognition ===
An offline API is offered to recognize the language used in a string. This recognition is also used for translations to avoid unnecessary translations (e.g. EN to EN translations are prevented). This payload will not be sent to any backend service, thus avoiding unnecessary costs.<br>
An offline API is offered to recognize the language used in a string. This recognition is also used for translations to avoid unnecessary translations (e.g. EN to EN translations are prevented). This payload will not be sent to any backend service, thus avoiding unnecessary costs. A few features exist which should make sure, a recognized language is only considered, if there is enough confidence:
A few features exist which should make sure, a recognized language is only considered, if there is enough confidence:
* Strings shorter than 6 words are skipped, since the chance for false positives are relatively high
* Strings shorter than 6 words are skipped, since the chance for false positives are relatively high
* Strings in which are not enough word matches to be confident for any language will be skipped, also because of high chances for false positives
* Strings in which there are not enough word matches to be confident for any language will be skipped, also because of high chances for false positives
* Strings in which are more than one language with a nearly similar amount of word matches will be skipped
* Strings that are more than one language with a nearly similar amount of word matches will be skipped


Supported languages: de, en-gb, fr
Supported languages: cs, de, en-gb, es, fr, it, nl, pl, pt-pt, ro, ru, sl, tr


=== Caching ===
=== Caching ===
To save costs, all translations are cached in the App Services database. If a string is translated multiple times, only the first translation is carried out by the backend and the translated version is saved in the cache. A second translation is therefore free of charge and performs better.
To save costs, all translations are cached in the App Services database. If a string is translated multiple times, only the first translation is carried out by the backend, and the translated version is saved in the cache. A second translation is therefore free of charge and performs better.


=== Translations against the backend ===
=== Translations against the backend ===

Latest revision as of 14:59, 5 May 2026

Overview

The idea of the translations app is to provide an interface for other apps to translate user content on-the-fly. So other apps can integrate the translation service via the local JavaScript API in the client and thus offer the user translated texts.

The service serves as a proxy and integrates a corresponding backend. This means that you need your own account at the external translations service and can configure your credentials in the Settings App.

Supported translation services

You can configure multiple translation backends and switch between them.

DeepL

This interface uses the https:///www.deepl.com translation API.

This interface is used as the default interface. you dont must provide an API-URL in the Settings. A custom API-URL is only for a local version with the same API interface.

Privacy
API Free: https://www.deepl.com/de/privacy#section_12
API Pro: https://www.deepl.com/de/privacy#section_5
Cost model and Pricing
Pay per character (To save costs, the app service offers a cache to avoid multiple translations)
https://www.deepl.com/de/pro#developer

Technical Concept

  • The DeepL API is a synchronous HTTP flow. This means that we request a translation and get an instant response with the translation.
  • Outgoing HTTP(S) request to the DeepL API
  • If you not override the URL, it is used HTTPS only

EU - eTranslation

This interface uses the EU service eTranslation.

European Commission’s free and secure AI language tools: https://translation.ec.europa.eu/tools-and-resources/ai-translation-and-language-tools_en

Technical Documentation: https://language-tools.ec.europa.eu/dev-corner/etranslation/rest-v2/text

Technical Concept

  • The EU-eTranslation uses an asynchronous HTTP flow with webhooks to deliver processed translations
  • Translation flow
    1. On every app startup
      1. a dynamic user / password combination is created, which will be used for later secure incoming webhooks
        1. Example: 23bcf2fd / 19ccf70b-028c-e7a8-94eb-1ad7db91d4c8
      2. the own app url is generated from the current environment
        1. Example: https://23bcf2fd:19ccf70b-028c-e7a8-94eb-1ad7db91d4c8@apps.slu.de/slu.de/translations/webhook-basicauth
    2. Outgoing HTTPS request to the eTranslation Service. The translation job will be queued. As additional information in the job, a callback webhook URL with a username and password will be placed.
    3. If the processing is finished, a webhook to the app is delivered via HTTPS
    4. The job result will be processed and delivered back to the user that has requested the translation

Limitations

  • 50 concurrent translation requests
  • 5.000 characters per translation

Licensing

No license needed

Installation

Go to the PBX manager and open the "AP app installer" plugin. On the right panel, the App Store will be shown.

  • In the search field located on the top right corner of the store, search for "Translations" and click on it
  • Select the proper firmware version and click on install
  • Close and open the PBX manager to refresh the list of the available colored AP plugin
  • Click on the "AP Translations" and click on " + Add an App"
  • Enter a "Name" that is used as the display name (all characters allowed) for it and the "SIP" name that is the administrative field (no space, no capital letters). e.g : Name: Translations, SIP: translations
  • Tick the appropriate template to distribute the App (the app is needed at every user object from any user who wants to use the translation API)
  • Click OK to save the settings and a green check mark will be shown to inform you that the configuration is good

Translation - Client

There is no view/app that the user can explicitly open. The service runs in the background and has no UI and can be integrated by other apps. In order for the user to have access to the translation service, their user object must have access to the app object of the translations app.

The client side of the app service receives requests from all other apps via the local JavaScript API and sends them to the service. The result of the request is returned to the original app via the local JavaScript API

Translation - App Service

The App Service performs tasks in the following areas:

  • Language recognition
  • Caching
  • Translations against the backend (deepl.com)

Language recognition

An offline API is offered to recognize the language used in a string. This recognition is also used for translations to avoid unnecessary translations (e.g. EN to EN translations are prevented). This payload will not be sent to any backend service, thus avoiding unnecessary costs. A few features exist which should make sure, a recognized language is only considered, if there is enough confidence:

  • Strings shorter than 6 words are skipped, since the chance for false positives are relatively high
  • Strings in which there are not enough word matches to be confident for any language will be skipped, also because of high chances for false positives
  • Strings that are more than one language with a nearly similar amount of word matches will be skipped

Supported languages: cs, de, en-gb, es, fr, it, nl, pl, pt-pt, ro, ru, sl, tr

Caching

To save costs, all translations are cached in the App Services database. If a string is translated multiple times, only the first translation is carried out by the backend, and the translated version is saved in the cache. A second translation is therefore free of charge and performs better.

Translations against the backend

Translation requests that cannot be handled by the local cache are forwarded to the configured translation backend. After successful translation, the translated version is kept in the cache for future requests.

The list of supported languages depends on the supported languages of the used service provider. It will be read from the service provider each time the Translations App Service starts.

Troubleshooting

To troubleshoot this App Service, you need the traceflags App, Database, HTTP-Client in your App instance.

Related Articles