RickStrahl / Westwind.Globalization

Database driven resource localization for .NET applications
544 stars 135 forks source link

Taking in account files tree importing and exporting ResX and strongly typed resources #193

Open Juloop opened 4 years ago

Juloop commented 4 years ago

Hi Rick,

I would like to expose you some trouble I got with the tree/path resource file naming convention. That could lead to some new features.

As described in the Microsoft documentation, you can either name your resource files with dots or organize them in a tree.

If you choose to organize them in a tree (which seems to be a good idea for a large web site for example), the import feature of Westwind.Globalization will create badly named ResourceSet. The relative path is not taken in account. The result is that localization will not work until you rename it including the path. The worst case is if you have files with the same name as described in this issue.

Plus, if you want to re-export the resource files, either you have renamed the resource sets and you will get resource files with dots, or you have not renamed them and you will have to export directory by directory.

Finally, the strongly typed resources classes will no work with the dots naming conventions. A class cannot contain dots in its name. I would like to use the namespace contained in the ResourceSet name as relative path and namespace for the generated class file(s).

What do you think about developing new features to take that in account?