Skip to end of metadata
Go to start of metadata

Since version 1.1.0 oTranCe offers a connector for external applications (see Connector). You can connect your application in order to hand over a list of keys to translate.

Since oTranCe doesn't know anything about your target application, you need to create the part of the code that collects the keys and their translations from the current page and sends them to oTranCe. At least you need to do so unless there is no free plug-in for your system out there in the Open Source world. I did publish a free plug-in for OXID eShop on GitHub - see https://github.com/DSB/Oxid-oTranCe-Connector .

When you create a plug in for another system we'd be glad if you'd publish it as Open Source.

Creating a plug-in for your application

So, how does it work?

I tried to make this as easy as possible - there is no REST(-full), no SOAP, no AuthTokens ... just a simple form submitted via POST.

In your application you only need to build a form containing the keys and their translations in input fields that are named oTranceKeys[keyId] and place the translation in the value attribute.

 

 

Of course your translators need a way to trigger the submit of this form. The way how you implement this is up to you.

The following requirements/facts can be of interest:

  • The encoding of the strings must be UTF-8.
  • The keys (key1, key2, ..) must be the same as the ones created in oTranCe.
  • Keys that are submitted but do not exist in oTranCe are silently ignored.
  • In oTranCe the uniqueness is defined by the combination of the key and the file template where it is used. If the key is not unique and is present in two different file templates oTranCe lists both entries.
  • The oTranCe user needs the User can see and use menu item "Connector" permission. Otherwise he we will see a "no permission" message.

 

oTranCe handles the rest; e.g. it checks the log in of the user and redirects him to the log in form first.

 

  • No labels