Internationalization reset all pages!

Hello,

After working on a project for a while, we decided to add internationalization.

We chose 2 cultures (english and french) and we chose english as a default culture.

When we came back to work on the project pages, we were surprised to see that all the modifications made to the pages since the beginning of the project had disappeared. For example, all the user management pages are back to their original state. On the other hand, the layouts have remained intact.

As we have already put a lot of time into the project, I would like to know how to implement the internationalization without destroying the work already done.

Thanks

1 Like

Hey @bgauvreau,

Adding cultures to the application will not reset anything, only if you choose to recreate your pages on data source infer, and the overwrite pages checkbox is checked will do. What changes you’ve made and where exactly you’ve made the changes? Are you changing .razor files directly?

Hello Vladimir,

Thank you for your quick response. Thanks to your hints the problem is solved. The problem was caused by the checkbox "Overwrite existing pages" in the security tab. It seems that checking this option overwrites all authentication windows when saving the application settings, even if the settings are not related to authentication. In this case it was the internationalization settings in the "settings" tab.

overwrite

I have another question about internationalization: Once the cultures have been implemented, we get the files xxx.yyy.resx where we have to translate the strings. Among other things, we can translate the column names of the DataGrids. However, no string in the corresponding xxx.yyy.resx file seems to be provided for translating the texts of the filter window.

Filter_in_action

I know that the text in the filter window can be modified using the fields in the DataGrids properties window, but it seems essential to me that these fields can be translated automatically depending on the culture selected.

So my question is this: Is there any way, either in Radzen or in Visual Studio to translate the texts of these filter windows? I have looked through the file tree of our project's solution and I can't find any .razor file where the standard translation mechanism of Blazor could be implemented.

Thanks in advance for your help

Hi @bgauvreau,

Check the expressions (chain button next to a property) applied to other translated properties - you can apply the same expression to these properties that will retrieve desired translated string from the resx file for the page.

Hi,

I'm sorry but all the translated properties in our application have as expression the basic text displayed by the widget, not some kind of computed expression.

image

for example here the Label called pageTitle has as expression the same string as the Text property of this widget. Not a translation related expression. And this is the same for all widgets in the application, even though the xxx.yyy.resx pages have been set up.

Any other idea?

Hi @bgauvreau ,

Sorry, I've not explained this well. There is a resx file generated for every page for every culture:

The expression to get the string resource from this file can be seen in the page .razor file:

You can add additional resources to the non default culture resx file and use these resources using the same expression in Radzen binding dialog:



Hi.

It works very well now!

Thank you so much for your help. Your support confirms that I made the right choice to choose Radzen.

Have a nice day :slight_smile: