Im creating a C# Application based on WinForms / KryptonForms, and as the application is halfway in development i thought to myself I best sort the localization out.
As a born and bread PHP Programmer (and I know C# is a whole new level), I would create a class to detect the language and auto assign the language pack to the application. and then use the language objects to access the values.
Im wondering if I can get some examples on the easiest / Best methods of doing this.
I personally would like something along the lines of the Application Settings
Where usually I would do MyApplication.Properties.Settings.Default.SomeKey
I was hopeing of a MyApplication.Languages.Current.ApplicationTitle
and MyApplication.Languages.en.ApplicationTitle
for example.
Also by only loading a single resource per language file to improve speed would be benificial aswell.
So the language loads in English, Spanish user is promoted that this application is in english, would he like to change it to the Spanish language, he clicks YES, the settings get updated and application restarts and loads the single Spanish language pack.
What's your thoughts on this.
Edit:
The application is based on the XMPP Protocols and uses agsXMPP Libraries. From my understanding each user that sends me their presence should also send the language their system is on.
So basically if there's any way to "grasp" the fact of storing a single word and using the __("some string")
in my application would be possible, but for the mean time I'm just looking at the GUI text.