Hi Robert,
Patrick is correct - there isn't any "documented" support for dealing with translated strings. However, besides the lead he provided ( with the LearningPanel.zip file), I'll throw out another couple potential ideas.
The perspectives that come by default in CA are defined basically the same way extensions are defined. You can find the JSON for these in the install folder in the <ca_installdir>/perspectives/ folder. Inside the perspectives folder is a folder for each perspective. Inside each of these is an application.json file (which is pretty similar to the spec.json file in your extension), a contrib subfolder, and usually a locale subfolder. The contrib folder has other json files which contribute to the perspective's application.json, when the perspective is served up. If you look in the application.json files (or the json files in the contrib folders), you'll see instead of string constants for some of the attributes (e.g. "label") , instead of the actual string, there will be a string that starts with a "%" - such as "%discoveryBrowser_label". The "%" prefix tells the system to lookup this token (e.g. in this case "discoveryBrowser_label") in the locales subfolder and replace it with the respective language string for this token. What I don't remember 100%, is if your extension uses a %<label> for a string attribute, where <label> is defined for this perspective (in the perspectives locale subfolder), will it do the translation for an extension (but you could try it! ;-) )
(In fact, if you create a new folder named "foo" under perspectives/ folder, and put an appropriate application.json file in it, then you'll have added a new perspective to your CA install, called "foo" - which you can open at "http://<cognos-server>:9300/bi/?perspective=foo (or whatever gateway you have for your CA installation.)
---
On a related note, you can build your own locale specifics into your extension, using the product locale setting which you can retrieve from the UserProfile service. In your extensions javascript, you can retrieve the product locale and and add you logic to use this locale, with a line line this:
this.text = __glassAppController.glassContext.getCoreSvc('.UserProfile').preferences.productLocale.startsWith("fr")
? "Ceci est le texte de la clause de non-responsabilité pour l'utilisation de ces données."
: "This is the text for the disclaimer for using this data.";
Regards,
Jim
------------------------------
Jim Boland
LinkedIn:
https://www.linkedin.com/in/jimbolandWebsite:
https://coreinsightz.comEmail:
jimboland@coreinsightz.com------------------------------