cancel
Showing results for 
Search instead for 
Did you mean: 
Liliia_DevX
Sisense Team Member
Sisense Team Member

Metadata Plugin - Grouping Provider Example (Multiple Translations for Different User Groups)

This community post will provide a great example of how to implement a grouping provider in the Metadata Plugin. This solution covers the following case: having multiple user groups who use different system languages requires a relevant metadata translation to be applied to the user based on the group.

In our example below, we will have two different translations - French and Ukrainian - to show the plugin in action.

Step 1 - Create Relevant Groups

Begin by navigating to Admin > User Management > Groups > +Add Group. Create the groups you need for the plugin setup. For example, Ukrainian and French:

Screenshot 2023-08-14 at 15.00.18.png


Step 2 - Retrieve Group Id

Proceed to the REST API section under the Admin tab. Execute the GET/groups API to obtain the IDs for each group you established.

Screenshot 2023-08-14 at 15.55.50.png


Step 3 - Configure globalDatasourceAliasing and datasourceAliasing

globalDatasourceAliasing: This term signifies the translation of metadata on a global scale, encompassing elements such as folders, dashboard names, and more.
datasourceAliasing: This component pertains to metadata related to titles, formulas, tables,
widgets, and other specifics.

This should be configured in run.js file. For example, 

Liliia_DevX_0-1692025067131.png

Step 4 - Define your datasourceAliasing

Formulate your datasourceAliasing structure as depicted below:

Liliia_DevX_0-1692025605328.png

 

Step 5 - Set Up Configuration

You can establish multiple globalDatasourceAliasing and datasourceAliasing instances within the
config variable. This array holds the configuration data to configure the metadata plugins. Here you need to use the group ids you retrieved before in step #2 and assign them to the relevant configuration.  There could be multiple groups assigned to one config.

Liliia_DevX_1-1692024794731.png


Note:
If a user belongs to more than one group with different translations, the default system language will be used and you'll get a notification like below:

Liliia_DevX_1-1692025240965.png


Step 6 - Put Your Plugin on the Sisense Server

Import the metadata plugin with your own run.js config into the plugins directory via File Manager. Make sure the plugin is enabled and enjoy your translation 🙂 

Liliia_DevX_2-1692025394523.png


The example plugin is attached for your reference. By adhering to these steps and structuring the configurations as shown, you can effectively set up your metadata plugin. This approach provides you with flexibility in handling different languages and user groups. Feel free to use it to develop your own solutions!

Disclaimer: Please note that this blog post contains one possible custom workaround solution for users with similar use cases. We cannot guarantee that the custom code solution described in this post will work in every scenario or with every Sisense software version. As such, we strongly advise users to test solutions in their environment prior to deploying them to ensure that the solutions proffered function as desired in their environment. For the avoidance of doubt, the content of this blog post is provided to you “as-is” and without warranty of any kind, express, implied, or otherwise, including without limitation any warranty of security and or fitness for a particular purpose. The workaround solution described in this post incorporates custom coding, which is outside the Sisense product development environment and is, therefore, not covered by Sisense warranty and support services.

Rate this article:
Version history
Last update:
‎02-15-2024 09:59 AM
Updated by: