Menu

Change dashboard in MenuNode based on language

2024-05-01
2024-05-01
  • Lucas Poirier

    Lucas Poirier - 2024-05-01

    Hey!
    I have two dashboards definitions, one in french and one in english, and I'm trying to make it so the MenuNode will lead to the right one based on the user's language preferences. Currently, the titles and stuff are all written in the XML. Is there a possibility to use dictionary files for this or any other way to change titles dynamically based on language?

    Thanks!
    LTP

    Example of English DashboardMenuNode:

    <menu id="GeneralInformation" xsi:type="DashboardMenuNode" _delta="define">
          <rank>50</rank>
          <parent>AssetManagement:Overview</parent>
          <definition>
            <dashboard xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
              <layout>DashboardLayoutTwoCols</layout>
              <title />
              <auto_reload>
                <enabled>true</enabled>
                <interval>300</interval>
              </auto_reload>
              <cells>
                <cell id="0">
                  <rank>0</rank>
                  <dashlets>
                    <dashlet id="CUSTOM__ID_row0_col0_4" xsi:type="DashletHeaderStatic">
                      <rank>0</rank>
                      <title>English Title</title>
                      <icon>itop-config-mgmt/images/typology.png</icon>
                    </dashlet>
     ...
    
     
  • Lucas Poirier

    Lucas Poirier - 2024-05-01

    Solved: We can use dictionary values for this.

    Example:

    <title>Menu:GeneralInformation</title>
    
     
    👍
    1

    Last edit: Lucas Poirier 2024-05-01

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.