Wisej.Web.Ext.DxDashboard.DxDashboard Language change problem

Answered
0
0

Hello, I use Wisej.Web.Ext.DxDashboard.DxDashboard control, I use many features actively, but I cannot manage the culture of dxDashboard despite trying many methods. How can I achieve this?

Attachment
  • You must to post comments
Best Answer
0
1

Hello, thank you for your support. The problem has been fixed through the article you shared. I share it in case others may need it for solution

URL : https://docs.devexpress.com/Dashboard/402540/web-dashboard/integrate-dashboard-component/dashboard-control-for-javascript-applications-jquery-knockout-etc/localization

—– Web.config —–

<handlers>
<!–<add name=‘json’ verb=‘*’ path=‘*.json’ type=‘System.Web.HttpForbiddenHandler’ />–>

<!– First we put the general JSON blocking –>
<add name=‘jsonBlockAll’ verb=‘*’ path=‘*.json’ type=‘System.Web.HttpForbiddenHandler’ />

<!– Now we only allow JSONs under /Resources/ –>
<add name=‘jsonAllowResources’ verb=‘GET’ path=‘Resources/*.json’ modules=‘StaticFileModule’ resourceType=‘File’ />
<add name=‘wisej’ verb=‘*’ path=‘*.wx’ type=‘Wisej.Core.HttpHandler, Wisej.Framework’/>
</handlers>

— dxDashboard Init Script —

this.init = function(options) {
    var self = this; // 'this' bağlamını saklıyoruz.
    
    $.when(
        
        $.getJSON("/Resources/dx-dashboard.tr.json").then(DevExpress.Dashboard.ResourceManager.setLocalizationMessages),
        $.getJSON("/Resources/dx-analytics-core.tr.json").then(DevExpress.Dashboard.ResourceManager.setLocalizationMessages)
    )
    .then(function () {
        
        DevExpress.Dashboard.ResourceManager.setLocalizationMessages({ "DashboardStringId.ActionExportTo": "Custom Text for Export Button" });

        
        DevExpress.localization.locale('tr');

        const dashboardOptions = {
            ...options,
            localization: {
                locale: 'tr'
            },
            cultureName: 'tr-TR',
            viewerSettings: {
                cultureName: 'tr-TR'
            },
            designerSettings: {
                cultureName: 'tr-TR'
            }
        };

        
        self.widget = new DevExpress.Dashboard.DashboardControl(self.container, dashboardOptions);

        
        if (self.widget) {
            self.widget.render();
        }
    })
    .fail(function(jqXHR, textStatus, errorThrown) {
        console.error("JSON dosyaları yüklenirken hata oluştu:", textStatus, errorThrown);
    });
}

 

  • You must to post comments
Best Answer
1
1

The DevExpress Dashboard control is created by a third party (DevExpress) and not by Wisej- thus, you’ll need to refer to their documentation on this.

Looks like you’ll need to use their localization service.

Relevant documentation:
https://docs.devexpress.com/Dashboard/402540/web-dashboard/integrate-dashboard-component/dashboard-control-for-javascript-applications-jquery-knockout-etc/localization
https://supportcenter.devexpress.com/ticket/details/t337308/translation-of-dashboard

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.