File-system based term import
It is also possible to import a TBX file from the file system into translate5s termCollections. For this a configuration file maps the TermCollection name with the file name of the TBX and the collection name with the customer number. In addition the config file defines the import directory, where the files are read from.
Example of the config file for the file system-based import. This file is located under "config" folder inside the TermImport plugin.
;import directory of the tbx files importDir=/var/www/translate5/data/import/tbx/; ;mapping between tbx file and term collection name [FileMapping] Term.tbx=exampletermCollection; Term1.tbx=exampletermCollection; Term2.tbx=exampletermCollection; example2.tbx=exampletermCollection2; example3.tbx=exampletermCollection3 ;mapping between term collection name and customer number [CollectionMapping] exampletermCollection3=1000; exampletermCollection2=1003;
This api call is only allowed for translate5 authenticated PM, Admin and API users.
To use the API as an authenticated user, first a session must be generated. More about how to authenticate and use translate5 API at: REST API
API call for filesystem import
URL: | (YOUR_TRANSLATE5_DOMAIN)/editor/plugins_termimport_termimport/filesystem |
Available Methods: | GET |
Specialities: | Start the files-system based term import for the files with location defined in the importDir parameter from the filesystem.config |
Availability: | It is avalable only for PMs (users with system roles PM, Admin or API) |
- example of the api call where the domain is translate5.net
http://translate5.net/editor/plugins_termimport_termimport/filesystem
TBX-import by using crossAPI (Across API)
Example of the config file for the file crossapi-based import. This file is located under "config" folder inside the TermImport plugin.
crossAPIurl=http://win.translate5.net crossExportFilesDir=/var/www/translate5/data/import/crossapi/ apiUsername=crossapi.user apiPassword=pass ;mapping between across export template and term collection [FileMapping] template-1.export=exampletermCollection ;mapping between term collection name and customer number [CollectionMapping] exampletermCollection3=10001; exampletermCollection2=10002; exampletermCollection=123456789;
API call for crossapi import
URL: | (YOUR_TRANSLATE5_DOMAIN)/editor/plugins_termimport_termimport/crossapi |
Available Methods: | GET |
Specialities: | Start the crossapi-system based term import for the across configuration files with location defined in the crossExportFilesDir parameter from the crossapi.config |
Availability: | It is avalable only for users with system role "admin" or "api") |
- example of the api call where the domain is translate5.net
http://translate5.net/editor/plugins_termimport_termimport/crossapi