Foxit PDF SDK  9.1
com.foxit.sdk.Localization Class Reference

Static Public Member Functions

static void setCurrentLanguage (Context context, Locale locale)
 
static Locale getCurrentLanguage (Context context)
 

Detailed Description

Localization tool class.

Member Function Documentation

◆ getCurrentLanguage()

static Locale com.foxit.sdk.Localization.getCurrentLanguage ( Context  context)
static

Get the current Language Locale

Parameters
contextThe context to use. Usually your Application#getApplicationContext() or Activity#getApplicationContext() object.
Returns
current locale

◆ setCurrentLanguage()

static void com.foxit.sdk.Localization.setCurrentLanguage ( Context  context,
Locale  locale 
)
static

Set current language by the Locale.

You can use this to switch the current language. Current sdk support 12 languages,you can switch languages by the following code:
1:english
Locale.ENGLISH
2:de-CH
Locale locale = new Locale("de","CH")
3:de-DE
Locale.GERMANY
4:es-LA
Locale locale = new Locale("es","LA")
5:fr-FR
Locale.FRANCE
6:it-IT
Locale.ITALY
7:ko
Locale.KOREAN
8:nl-NL
Locale locale = new Locale("nl","NL")
9:pt-BR
Locale locale = new Locale("pt","BR")
10:ru-RU
Locale locale = new Locale("ru","RU")
11:zh-CN
Locale.SIMPLIFIED_CHINESE
12:zh-TW
Locale.TRADITIONAL_CHINESE

If you have a custom language, you can also switch by constructing locale.

Parameters
contextThe context to use. Usually your Application#getApplicationContext() or Activity#getApplicationContext() object.
localeLocale