API reference

LanguagePack Class

The LanguagePack API provides a way to manage language packs for an application. A language pack is a collection of assets that are specific to a particular language, such as translations of text, audio files, and images. For more information, see here.

Static Methods

getCurrent ()
Returns currently installed and selected language pack for an app in the view of the com.meta.horizon.platform.ovr.models.AssetDetails. Use com.meta.horizon.platform.ovr.models.AssetDetails#getLanguage() field to extract needed language info. A particular language can be download and installed by a user from the Oculus app on the application page.
Signature
static Request<com.meta.horizon.platform.ovr.models.AssetDetails> com.meta.horizon.platform.ovr.requests.LanguagePack.getCurrent()
setCurrent ( tag )
Sets the current language to specified. The parameter is the BCP47 language tag. If a language pack is not downloaded yet, spawns automatically the com.meta.horizon.platform.ovr.requests.AssetFile#downloadByName(String assetFileName) request, and sends periodic com.meta.horizon.platform.ovr.Message.MessageType#Notification_AssetFile_DownloadUpdate to track the downloads. Once the language asset file is downloaded, call com.meta.horizon.platform.ovr.requests.LanguagePack#getCurrent() to retrieve the data, and use the language at runtime.
Signature
static Request<com.meta.horizon.platform.ovr.models.AssetFileDownloadResult> com.meta.horizon.platform.ovr.requests.LanguagePack.setCurrent(String tag)
Parameters
tag: String  - The BCP47 language tag that identifies the language to be set as the current language.