public class

LanguageManager

extends Object
java.lang.Object
   ↳ com.salesforce.android.knowledge.core.util.LanguageManager

Class Overview

Utility class that can be used to check the validity of a specific locale. A valid locale is one that supports a language that is fully supported by Salesforce. This class will attempt to map Locale instances to one of the supported languages, if possible.

Note that your community may or may not contain content for all Salesforce supported languages, so you may not be able to retrieve content for a given language even if it is a valid one.

Applications can specify what language the would like to use when retrieving articles by setting the initialLocale(Locale) when configuring the client. By default the device's Locale will be used if possible. Applications should specify a fallbackLocale(Locale) to use if the organization has not supplied translated articles for the initial locale.

Summary

Public Methods
static boolean isValidSfdcLocale(Locale locale)
Returns true if a Locale can be converted into a valid fully supported language string.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static boolean isValidSfdcLocale (Locale locale)

Returns true if a Locale can be converted into a valid fully supported language string. For a list of languages that may be enabled See https://help.salesforce.com/articleView?id=faq_getstart_what_languages_does.htm.

Parameters
locale the Locale to check
Returns
  • true if the locale can be converted into a fully supported language string.