Language Support for Consuming Remote Portlets
Note: The ServiceDescription provides translations for the following strings: title, shortTitle, description, displayName, and keywords. The main language value is placed inside the <offeredPortlets> tag, other language strings are inside <resources> tags at the end of xml file. PeopleSoft applications store the mapping of three-character PeopleSoft language codes such as ENG, FRA, CFR, and DUT, as well as ISO locales such as en, en-US, fr, fr-ca, and nl.
When we consume remote portlets, we request service description XML from the remote producer. We store the definition of the remote producer in the PeopleSoft database. We then parse service description XML and store the definitions of the remote portlets. If multilanguage data is in the service description, we map ISO locales to PeopleSoft language codes and store the values in our database along with the correct PeopleSoft language codes.
Note: We are interested only in such locales that correspond to installed PeopleSoft language codes. All other locales are ignored.
When parsing the remote ServiceDescription, we look for matches between ISO locales and installed PeopleSoft language codes. We accept the string values when matches are found. Here are the rules:
Accept if an exact match is found, for example, if fr-ca (CFR) is installed and fr-ca is provided in ServiceDescription.
If the child is installed and they provide only the parent, we accept parent for child. For example, if fr (FRA) and fr-ca (CFR) are installed and only fr is provided, it is matched to both fr and fr-ca.
If the parent locale is installed, but only children are provided, then accept the child for the parent. For example, if fr (FRA) is installed and fr-ca (CFR) is provided, then accept it for FRA.