Enables Translate5 to import other file formats as just bilingual files.
|Type||Core plug-in (delivered with translate5 core)|
The Okapi plugin enables you to use Okapi Longhorn REST server for converting native source file formats like MS Office 2007, Indesign, HTML, XML, etc. to Xliff and thus directly import these native file formats in translate5.
The end user of translate5 has no contact with Okapi - everything is handled by translate5 on import and re-export after translation.
Additional installation instructions
Download and install Okapi Longhorn as shown here: http://okapiframework.org/wiki/index.php?title=Longhorn#Download_and_Installation.
Important hints for Okapi with Tomcat9
Tomcat9 only has rights to write inside of its working directory, which under Ubuntu 18.04 and TomCat9 is
Yet, by default Okapi M37 with Tomcat9 tries to write to
So even if you create a directory at this place with user "tomcat" and rights 777, Okapi will not be able to write files there.
To solve this: Create a config file with the name "okapi-longhorn-configuration.xml" in the tomcat user directory.
Under Ubuntu 18.04 and Tomcat9 this may be the Linux root directory, meaning "/". To find out if this is the case in your Linux distro, you can look up the user directory for the user "tomcat" or "tomcat9" in /etc/passwd.
So for Ubuntu 18.04 and Tomcat9 create a file "okapi-longhorn-configuration.xml" at /okapi-longhorn-configuration.xml with the following contents.
Change the path to "working-directory", if the working directory of your Tomcat9 is located somewhere else.
Ensure that the parent directory of the working directory is writable for the tomcat user, since with the use-unique-working-directory flag = true, Okapi adds the Okapi version to the working directory name.
This is important for updating Okapi in productive envirionments.
Set the rights and user of the new directory (change the path, if your directory is somewhere else) and restart tomcat (change the call to restart tomcat, if this is different in your distro):
Important hints for Okapi with Tomcat8
Similar as for Tomcat9, also for Tomcat8 the working directory for Okapi needs to be set up manually.
To do this for Ubuntu 18.04, Okapi M37 and Java 1.8 do the following (for other Linux distros or Okapi versions the working directory might differ):
You can find out, if "tomcat8" is really your tomcat user, if you execute the following command, when tomcat is running:
Trouble shooting, if your Okapi installation is not working
Problems with Okapi working direcory
If you run into problems, please check the tomcat logs for messages like:
INFO: The default working directory for Okapi Longhorn will be used, because no other was specified: /usr/share/tomcat7/Okapi-Longhorn-Files
Ensure that the directory mentioned there exists and is writable for tomcat.
Try to put an Okapi config into the user directory of your tomcat user analogous to what is shown for Okapi installation with Tomcat 9 above.
If this does not help:
Previously we did run into a bug or problem with Okapi, that lead to a dysfunctional Okapi with Tomcat 8 and Okapi M35. So if you run into further problems, either try to set up a newer Okapi version or if you already have the latest Okapi version try to set it up with Tomcat 7 (with JVM 1.7.0_151-b01 Oracle Corporation ) or Tomcat 9 (as shown above). The current code block shows the installation of tomcat8. However it seems, that due to a bug in Okapi Longhorn the conversion routines needed by translate5 do not work correctly with Okapi Longhorn running under TomCat 8. Yet with TomCat 7 and the correct Java Version, everything seems to work fine. For more details see attached PDF file..
Translate5 Configuration of the Okapi Plug-In
|runtimeOptions.plugins.Okapi.api.url||string||Url used for Okapi api. In default Okapi setup this should be|
This usually is left empty, because in the default setup of translate5 you do not use Okapi Tikal, but Okapi Longhorn for conversion.
|integer||3||Max parallel running workers of the Okapi worker|
The above configurations must be set in the Zf_configuration table of your translate5 instance.
In addition the Okapi plug-in must be enabled in your translate5 instance.
To do both, execute the following code block. Be careful to change the contents to which "value" will be set in the sql-statements to your needs, if the plug-ins you want to activate or the URL for Okapi is different on your installation. Best look for the existing value of your plug-in configuration and simply add the Okapi Bootstrap-Class "editor_Plugins_Okapi_Init".