Project Resources Files

G

Gianmaria I.

Hi,
why if i modify a resx file from project file, a file that contains
localization, the ones added by visual studio on multilanguage enablig, this
files is automaticalli modified ad returns as the original one created by
VS?

my best regards
Gianmaria
 
G

Guest

Hi,

Yes, I have experienced that problem. If you use automatic localization VS
handles the multilingual one by its own, so if you change it it will be
overwritten. You can change the specific lengague resoruces without problem.
This behaviour is by design, otherwise you can create your own resource files
and have your forms reading them, this is a manual process but can give you
that flex.

My recommendation is do not use the multilingual version, create one for
english and the other one for french for example.

Best regards
Salva
 
G

Gianmaria I.

Any sample project i can watch to??? Can you send me?

gianmaria
(e-mail address removed)
 
G

Guest

Hi,

1) If you use automatic internationalization you should never touch your
resource files, use the designer to change things.
2) Try not to use the default lenguage one (Form1.resx), instead create one
for english and one for your other lenguage (Form1.en.resx) and
(Form1.xx.resx), you can change this files without problem.

Now if you want to do everything manual, just add a resource file, put all
your strings and embeed the file on your project. On your form you need to
detect the lenguage and then load the correct resource file:

System.Resources.ResourceManager.CreateFileBasedResourceManager()

Play with System.Resources and you will be surprise of the flexibility.

Sorry that I don't have an example here, On monday I will.
Cheers
Salva
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top