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.
You can check what languages are available on the server using the Client's method requestLanguagePacks(). It will return a list of LanguagePack objects containing information about each installed language pack. You can then use the data from this list to request a specific language pack file for download.
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 the Client's method requestLanguagePackFile(String,Locale). The method requires the base name of the actual language pack file on the server as the first parameter and the desired Locale as the second 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 method call:
Locale locale = Locale.UK;
byte langFileBytes = client.requestLanguagePackFile("lang.xml", locale);
Here is a complete example of how to request a specific language pack file:
- No labels