Hello,
I have a problem when accessing the resources files of my project after publishing it.
As it is a bit complicated (at least I have already struggled to come to this point), I'll first try to explain how my application works:
---------------------------------------------------
I have created an application that is localized (meaning the user can change the UI language). For that, I use resources files where are stored all strings displayed on all my forms.
(I added these resources files using this method: Right click on the project -> Add -> New Item... -> Resources File.)
I have currently two resources files, named Localization.re sx (english strings) and Localization.fr-FR.resx (french strings) and stored in a folder "Lang" under the project:

Here is an exemple of how I load the different strings, that I do in every forms.
Here is how I load the culture, for the program to know which Localization[.code].resx file to use:
---------------------------------------------------
This method is working fine when I run the program in debug mode. I can easily choose between the two languages in the options panel I developped.
My problem is, after publishing the program, when in the program I choose the french language, the application won't load the french strings and thus always be in english only.
So, that means that the resources files are not included in the project when publishing it.
I tried to add the resources files in the project properties (Resources tab -> Add resource... -> Add existing file...):

But it has no effect, It seems that my resources strings are not stored in my project after publishing it.
Here is the list of the files created after the publication:




(I hidden all and only the application names)
--
Thank you to those who read me and tried to understand my problem.
/Leito
I have a problem when accessing the resources files of my project after publishing it.
As it is a bit complicated (at least I have already struggled to come to this point), I'll first try to explain how my application works:
---------------------------------------------------
I have created an application that is localized (meaning the user can change the UI language). For that, I use resources files where are stored all strings displayed on all my forms.
(I added these resources files using this method: Right click on the project -> Add -> New Item... -> Resources File.)
I have currently two resources files, named Localization.re sx (english strings) and Localization.fr-FR.resx (french strings) and stored in a folder "Lang" under the project:

Here is an exemple of how I load the different strings, that I do in every forms.
Code:
this.labelLogin.Text = Lang.Localization.FLlabelLoginText; this.labelPassword.Text = Lang.Localization.FLlabelPasswordText; this.buttonOk.Text = Lang.Localization.FLbuttonOkText; this.buttonQuit.Text = Lang.Localization.FLbuttonQuitText; ...
Code:
Thread.CurrentThread.CurrentUICulture = new CultureInfo(lang); // With lang = "fr-FR" or "en"
This method is working fine when I run the program in debug mode. I can easily choose between the two languages in the options panel I developped.
My problem is, after publishing the program, when in the program I choose the french language, the application won't load the french strings and thus always be in english only.
So, that means that the resources files are not included in the project when publishing it.
I tried to add the resources files in the project properties (Resources tab -> Add resource... -> Add existing file...):

But it has no effect, It seems that my resources strings are not stored in my project after publishing it.
Here is the list of the files created after the publication:




(I hidden all and only the application names)
--
Thank you to those who read me and tried to understand my problem.
/Leito