Culture change did not affecting the control but it works with Form title in Vb.net
I am here with the same Query but with a different look
I want to apply the culture change to my program.
I created a class library for culture change. and applied it .
It is only working with the form name, i did it with two different languages and got the result.
But the controls inside the form remains as it is.
Sub ApplyCulture(Byval SelectedCulturename as String)
Dim Rm As New Resources.ResourceManager("YourProject.YourFormClass", System.Reflection.Assembly.GetExecutingAssembly())
Dim Ci As System.Globalization.CultureInfo = New System.Globalization.CultureInfo(SelectedCultureName)
Me.Text = Rm.GetString("$this.Text", Ci)
. ' you need to do this for all controls having a distinct text depending on the language
Me.btnWhatItWas.Text = Rm.GetString("btnWhatItWas.Text", Ci)
Then call this sub at the load event of the form. Also when you want to change the interface language.
Thanks for your reply
But scenario is little bit different.
this code is not dynamic.
to make it dynamic I created a Class library
and inside that I did the things you mentioned and used a code to get the controls of form dynamically.
It works with perferctly in demo project I got from web.
but when i tried to make my own program, I did all those things related to culture exactly similar to the demo project.
The thing is My form title is changing.
but the controls text is not changing.
Dim fields As FieldInfo() = form.[GetType]().GetFields(BindingFlags.Instance Or BindingFlags.DeclaredOnly Or BindingFlags.NonPublic)
This code returns exact name of controls in demo project.
but in my program and underscore is prefixed like '_controlName'.
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...