RESTAPI:Language Resources

Aus Cryptshare Documentation
Wechseln zu:Navigation, Suche

The Cryptshare Server can provide the Client with the language resources contained in the Language Packages that have been installed on the server. These Language Packages can then be used for a user interface on client side, for instance.

Available Languages

List the details of all available language packs

You can check what languages are available on the server.

GET https://<your-url>/api/products/<product-key>/language-packs


It will return a list of all installed language packs for the specified product and additional information about each installed language pack. You can then use the data from this list to request a specific language pack file for download.

By defining the optional query parameter 'major-version' the list of language packs can be reduced to those that correspond to the respective given version.

Description Property
Id of the language pack, contains locale and major version. id
The display name of the language, in the respective language. displayName
Language Tag locale
The version of the language pack, consisting of major and minor version. version
The date and time of the last update of the language pack, or null, if it was never updated. lastChangeTimestamp
The absolute path to the language pack resources. href

List the details a specific language pack

GET https://<your-url>/api/products/<product-key>/language-packs/<language-pack-id>

You can check the data of a specific language pack by addressing it with its id. Here, you get all information for the requested language pack instead of all.

Downloading a Language Pack File

Now that you know which Language Packages are available on the server, you can download a specific language pack file using this endpoint:

GET https://<your-url>/api/products/<product-key>/language-packs/<language-pack-id>/<path-to-file>

The endpoint requires the base name of the actual language pack file on the server as the path-to-file parameter.

Language Pack Base Name
The base name of the actual language pack file on the server is just the file name, minus the language or country information. For example, if you have the language pack file "lang_en_GB.xml" installed on the server, the base name for that language pack file would be "lang.xml". So you would request this particular language pack file, using the following URL: https://<your-url>/api/products/<product-key>/language-packs/<language-pack-id>/lang.xml