Translation of Grid

Hi,

we are using the grid and the json translation files (Webassembly). Everything works perfect, but 2 things are not translated (screen):

Items per Page, 1 of 1 pages, all the rest works fine with your default translation files..

Any idea?





5 Replies

RN Rahul Narayanasamy Syncfusion Team May 8, 2020 01:26 PM UTC

Hi Nils, 

Greetings from Syncfusion. 

We validated your reported problem at our end and you we may suspect that you have defined the SetCulture method in OnInitializedAsync/OnInitializaed method. Could you please define the SetCulture method within OnAfterRenderAsync method and ensure the problem at your end. Find the below documentation for your reference. 

Reference: 

   protected override async Task OnAfterRenderAsync(bool firstRender) 
    { 
        var data = await Http.GetJsonAsync<object>("localefiles/pt.json"); 
 
        this.JsRuntime.Sf().LoadLocaleData(data).SetCulture("pt"); 
    } 
} 

Please find the sample for your reference. 


If you are still facing the same problem, then could you please share the below details. It will be helpful to validate further. 

  • Share full code snippets.
  • Reproduce the problem in the provided sample.

Please get back to us if you need further assistance. 

Regards, 
Rahul 



UN Unknown May 8, 2020 01:38 PM UTC

No. i am using the onafterrender event.. Will try to create a repro..




RN Rahul Narayanasamy Syncfusion Team May 11, 2020 11:48 AM UTC

Hi Nils, 
 
We have validated your query and also we would like to inform that we have changed the keys case(in locale file) in one of our previous release for Pager. You need to change the Keys(First letter as Capital in particular locale(here pt.json file in wwwroot folder)) in locale file. Find the code snippets for reference.  
 
"pager": { 
            "CurrentPageInfo": "{0} de {1} páginas", 
            "TotalItemsInfo": "({0} itens)", 
            "FirstPageTooltip": "Ir para a primeira página", 
            "LastPageTooltip": "Ir para a última página", 
            "NextPageTooltip": "Ir para a próxima página", 
            "PreviousPageTooltip": "Ir para a página anterior", 
            "NextPagerTooltip": "Ir para o próximo pager", 
            "PreviousPagerTooltip": "Ir para o pager anterior", 
            "PagerDropDown": "itens por página", 
            "PagerAllDropDown": "Itens", 
            "All": "Todos" 
        } 
 
 
If you are still facing the same problem, then could you please share the below details. It will be helpful to validate the problem further. 
 
  • Full Grid code snippets.
  • Ensure the Key cases in your locale file.
  • Reproduce the reported problem in the provided sample.
  • Share reproduceable sample if possible.
 
Regards, 
Rahul 



UN Unknown May 11, 2020 11:54 AM UTC

Hi Rahul,

that solves my issues! Thank you.

Nils


RN Rahul Narayanasamy Syncfusion Team May 12, 2020 05:12 AM UTC

Hi Nils, 

Thanks for the update. 

We are happy to hear that the provided solution resolved your problem. Please get back to us if you need further assistance. 

Regards, 
Rahul 


Loader.
Up arrow icon