Our application needs to ensure all forms support localization by requesting to set form's "Localizable" property to true.
There are some developers may forget to set some form's "localizable" property to ture.
We notice that if a form sets its localizable property to true. Form resource file such as "Form1.resx" includes a line as following:
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"><value>True</value></
However, if the Form does not set its "Localizable" property (default is false), the form resource file will not include above line.
Is there a way such as tool or method we could use to go through all those resource files to find out those form resource files which do not support localizable?
We have two kinds of resource files. One is Form's resource files which are automatically generated by build and localated under each Form.vb class.
Another one is resource file we add into the project.
If there is no tool we can use and we have to create our own tool. We need to distinct those two kinds of resoruce files.
We only need to search for Form's resoruce files and check if the form resoruce files include "$this.Localizable".
We notice that Form resource files normally has following line:
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
or
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
Could we assume that we can base on above lines if in a resource file to decide if a resource file belongs to a form?Or there is better criteria we can use to tell form resoruce file.Thx!
JaneC