davidegironi / advanceddatagridview

A .NET WinForms DataGridView with advanced capabilities
392 stars 123 forks source link

Translation #106

Closed danielrb2598 closed 1 year ago

danielrb2598 commented 1 year ago

Hello, I installed this package through NuGet in my application. How do I use the pt-BR translation?

I saw in the sample project that it has this translation.

I'm usind Visual Studio 2022.

Thank you very much and congratulations on the great work.

davidegironi commented 1 year ago

Thank you. You can take as example the sample project. If you look at the FormMain file, you can find here how to load translations from a dictionary or straight from a file. Suppose your file is called "lang.json" then you can load it by using the following commands:

AdvancedDataGridView.SetTranslations(AdvancedDataGridView.LoadTranslationsFromFile("lang.json"));
AdvancedDataGridViewSearchToolBar.SetTranslations(AdvancedDataGridViewSearchToolBar.LoadTranslationsFromFile("lang.json"));

Hope this helps.