Difference between revisions of "LanguageFallback"

From SAP Enable Now Wiki
(Created page with "__NOTOC__ {{DISPLAYTITLE: languageFallback}} ==Scope== Web Assistant parameter, specified either in the URL or in the Web Assistant parameters in the linked application. ==P...")
 
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
  
 
==Scope==
 
==Scope==
Web Assistant parameter, specified either in the URL or in the Web Assistant parameters in the linked application.
+
SAP Companion parameter, specified either in the URL or in the SAP Companion parameters in the linked application.
  
 
==Purpose==
 
==Purpose==
Line 11: Line 11:
 
Specified as:
 
Specified as:
 
  languageFallback={"sll-sCC":["fll-fCC"]}
 
  languageFallback={"sll-sCC":["fll-fCC"]}
 +
or
 +
langAlt={"sll-sCC":["fll-fCC"]}
 
where <tt>sll-sCC</tt> is the (ISO-639) language and (ISO-3166) country code of the user's interface language, and <tt>fll-fCC</tt> is the language and country code of the fallback language.  
 
where <tt>sll-sCC</tt> is the (ISO-639) language and (ISO-3166) country code of the user's interface language, and <tt>fll-fCC</tt> is the language and country code of the fallback language.  
  
Line 34: Line 36:
 
* '''[[globalLanguageFallback]]'''
 
* '''[[globalLanguageFallback]]'''
  
[[Category: Web Assistant parameter]]
+
[[Category: SAP Companion parameter]]

Latest revision as of 21:44, 9 November 2023


Scope

SAP Companion parameter, specified either in the URL or in the SAP Companion parameters in the linked application.

Purpose

This parameter can be used to specify the fallback language for specific languages, as an alternative to the globalLanguageFallback (which applies to all languages). A fallback language is the language in which help should be displayed if it is not available in the user's (interface) language. For example, you may have a Global Fallback Language of English, but want to specify that if Portuguese (Brazil) isn't available, Spanish (Spain) is used instead (which is arguably closer to Portuguese than English...).

Usage

Specified as:

languageFallback={"sll-sCC":["fll-fCC"]}

or

langAlt={"sll-sCC":["fll-fCC"]}

where sll-sCC is the (ISO-639) language and (ISO-3166) country code of the user's interface language, and fll-fCC is the language and country code of the fallback language.

You can specify multiple fallback definitions by using the format:

languageFallback={"sll1-sCC1":["fll1-fCC1"],"sll2-sCC2":["fll2-fCC2"]}

And you can specify multiple fallbacks for a single language by using the format:

languageFallback={"sll-sCC":["fll1-fCC1","fll2-fCC2"]}

But note that the parameter value(s) must be URI-encoded, which means replacing:

  • Quotation marks ( " ) with %22
  • Colons ( : ) with %3A
  • Commas ( , ) with %2C
  • Open and close braces ( { } ) with %7B and %7D respectively
  • Open and close square brackets ( [ ] ) with %5B and %5D respectively

(Tip: You can find a useful URL encoder at URLencoder.org.)

The usage specification above, correctly encoded, would be:

languageFallback=%7B%22sll-sCC%22%3A%5B%22fll-fCC%22%5D%7D

As a working example, to use a fallback language for pt-BR of es-ES, you would use:

languageFallback=%7B%22pt-BR%22%3A%5B%22es-ES%22%5D%7D

See Also