[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 912
  • Last Modified:

acess to Core.resx from C#

Hey
I'm trying to access the local version of core.resx. In my case this is a danish version named core.da-DK.resx.

My problem is that i'm not able to access the danish version trough code, but if I want to acces the standart(english) core.resx all is well, but I need the danish values.

I've notied that the core.da-dk.designer.cs file is empty and the core.designer.cs har lots of properties.

Any help is appreciated

regards

Birger
0
Birger1000
Asked:
Birger1000
1 Solution
 
_Katka_Commented:
Hi, I've notice you've been neglected.. Are you trying to read the file from your disk, or from within itself , as in an embedded resource ?

regards,
Kate
0
 
Chuck YetterCommented:
Did you set the thread's culture first?  If you want your app to run as a Danish version, then add this code before the call to InitializeComponent() in the form's constructor:

string culture = "da-DK";
Thread.CurrentThread.CurrentCulture = new CultureInfo(culture);
Thread.CurrentThread.CurrentUICulture = new CultureInfo(culture);

InitializeComponent();

Open in new window

0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now