class LanguagePack
LanguagePack
()
|
Signature
constructor() Returns LanguagePack |
getCurrent
()
|
Returns currently installed and selected language pack for an app in the view of the AssetDetails. Use AssetDetails.language 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.
This method can return the following status codes: common status codes in LanguagePackStatusCode, LanguagePackStatusCode.NotEntitled, LanguagePackStatusCode.StoreInstallationOrInvalidRequestError, LanguagePackStatusCode.LanguagePackNotSet, LanguagePackStatusCode.LanguagePackNotFound, LanguagePackStatusCode.InstallationFailedOrInternalError.
Signature
suspend fun getCurrent(): AssetDetails Returns AssetDetails
The current language pack asset details.
|
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 AssetFile.downloadByName request, and sends periodic AssetFile.downloadUpdate to track the downloads. Once the language asset file is downloaded, call LanguagePack.getCurrent to retrieve the data, and use the language at runtime.
This method can return the following status codes: common status codes in LanguagePackStatusCode, LanguagePackStatusCode.NotEntitled, LanguagePackStatusCode.LanguagePackNotFound, LanguagePackStatusCode.InstallationFailedOrInternalError.
Signature
suspend fun setCurrent(tag: String): AssetFileDownloadResult Parameters tag: String
The BCP47 language tag that identifies the language to be set as the current language.
Returns AssetFileDownloadResult
The result of the operation.
|