How to set Language for this Requirement [Resolved]

Posted by Jayakumars under .NET Framework on 3/8/2016 | Points: 10 | Views : 204 | Status : [Member] [MVP] | Replies : 3
Hi

I need how to change label and textbox font change english,hindi in windows application without internet


I have one combox when i select hindi i all my forms label totally changed hindi font

how will do this

same as english

how will do this without internet in windows application.(Dotnet Only)

Mark as Answer if its helpful to you


Responses

Posted by: Rajnilari2015 on: 3/8/2016 [Member] [Microsoft_MVP] [MVP] Platinum | Points: 50

Up
0
Down

Resolved
@Jayakumars Sir, you have to maintain Resource File (.resx) for that. Then you can read the File and Set the Controls values based on the current culture.

e.g.
<asp:Button ID="btnTest" Text="<%$ Resources: TestResource, Test %>" />


Then based on the Current thread culture you can set the values (hindi, English etc.)
e.g.



private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
var cultureName = comboBox1.SelectedItem;
switch(cultureName)
{
case "en-US" :

Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(cultureName);
MessageBox.Show(<ResourceName>.<KeyName>); break;
case "hi-IN" :

Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(cultureName);
MessageBox.Show(<ResourceName>.<KeyName>); break;
}

}



Hope this will help you to go ahead.


--
Thanks & Regards,
RNA Team

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 3/9/2016 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Hi

Thanks Rajnilari2015 Je

you have fast response in all Questions

Thanks a lot

Can you send Mail me sample project for this language depends.




Mark as Answer if its helpful to you

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 3/9/2016 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Hi

I am asking Pure windows application C# based.

Mark as Answer if its helpful to you

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response