user123
user123

Reputation: 73

German resources loaded from resource only dll when system locale is french

In an MFC application, there are German, French, Spanish resource files. These resource files have resources to be loaded for all sub-languages.

Say for German:

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU) || defined(AFX_TARG_DES) || defined(AFX_TARG_DEA) || defined(AFX_TARG_DEL) || defined(AFX_TARG_DEC)
LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
#pragma code_page(1252)

Resource DLL is loaded using LoadLibrary. OS is Windows 7 Enterprise English version. In clock -> language -> region from Control Panel, it is "France". What is the reason for German resources to be loaded when MFC application is opened?

Upvotes: 1

Views: 289

Answers (1)

dev-masih
dev-masih

Reputation: 4746

As we discuss in comments you can use setlocale here is the solution.

Upvotes: 1

Related Questions