Difference between revisions of "Data Portal Configure"

From Fusion Registry Wiki
Jump to navigation Jump to search
Line 4: Line 4:
 
[[File:Portal Config files.png|800px]]<br>
 
[[File:Portal Config files.png|800px]]<br>
  
siteconfig.json Defines where the API will find the connected Fusion Registry and defines which Locales are supported and generates a language picker in the User interface. For example:
+
=== siteconfig.json ===
 +
Defines where the API will find the connected Fusion Registry and defines which Locales are supported and generates a language picker in the User interface. For example:
  
 
   "ServicesAPI" : "http://localhost:8063/FusionRegistry/ws/fusion/info/product",
 
   "ServicesAPI" : "http://localhost:8063/FusionRegistry/ws/fusion/info/product",
Line 12: Line 13:
 
Add the appropriate code as show below
 
Add the appropriate code as show below
 
   "Locales" : ["en", "he", "ru"],
 
   "Locales" : ["en", "he", "ru"],
 +
 +
=== browser_lang_en.json  ===
 +
 +
The browser_lang_[locale].json file contains a map of property name to human readable label, for example:
 +
  "btn.add.connection" : "Add Connection",
 +
 +
The Language configuration file is used to decode labels on the User Interface. Any metadata (Dataflows, Concepts, Codes) used by the Data Portal come from the web service, requested in the selected locale - as such the language configuration file does not play a role in decoding values in the retrieved metadata.
 +
 +
For each supported locale there should be a corresponding file, for example browser_lang_en.json is used if the locale on the client is set to en, browser_lang_he.json is used if the locale on the client is set to he'. If the locale is set to a value where there is no corresponding locale file, the browser_lang_en.json file will be used to decode values on the client.
 +
 +
It is possible to change labels in the browser lang file, or to copy the file into a new locale, however it must be noted that new labels may be added in future releases of Fusion Data Browser, and this should be taken into account when maintaining any changes made locally.

Revision as of 00:57, 17 August 2023

Fusion Data Portal contains two Configuration files which are in the dist/properties folder.

Portal Config files.png

siteconfig.json

Defines where the API will find the connected Fusion Registry and defines which Locales are supported and generates a language picker in the User interface. For example:

 "ServicesAPI" : "http://localhost:8063/FusionRegistry/ws/fusion/info/product",
 "Locales" : ["en"]

Adding additional locales Add the appropriate code as show below

  "Locales" : ["en", "he", "ru"],

browser_lang_en.json

The browser_lang_[locale].json file contains a map of property name to human readable label, for example:

  "btn.add.connection" : "Add Connection",

The Language configuration file is used to decode labels on the User Interface. Any metadata (Dataflows, Concepts, Codes) used by the Data Portal come from the web service, requested in the selected locale - as such the language configuration file does not play a role in decoding values in the retrieved metadata.

For each supported locale there should be a corresponding file, for example browser_lang_en.json is used if the locale on the client is set to en, browser_lang_he.json is used if the locale on the client is set to he'. If the locale is set to a value where there is no corresponding locale file, the browser_lang_en.json file will be used to decode values on the client.

It is possible to change labels in the browser lang file, or to copy the file into a new locale, however it must be noted that new labels may be added in future releases of Fusion Data Browser, and this should be taken into account when maintaining any changes made locally.