Hi,
I am trying to implement string localization in the windows application (Console app ).
To achieve this i have done following.
I have added two resource files in the project namele. English.rc and Germany.rc
In English.rc
I have added a string table. Its language is set to English(United States)
In Germany.rc
I have added a string table. Its language is set to Germany(Germany)
In both string tables i have adde a string resource entry
For English.rc
ID = IDS_STRING_Title
Value = 101
Caption = EnglishCaption
For German.rc
ID = IDS_STRING_Title
Value = 101
Caption = GermanCaption
I have kept the value of the string resources in both rc files to 101.
I am trying to consume this string into the code as follows.
#include "stdafx.h"
#include "windows.h"
#include "atlstr.h"
#include "resource1.h"
#include "resource.h"
int _tmain(int argc, _TCHAR* argv[])
{
CString str( MAKEINTRESOURCE( IDS_STRING_Title ) ) ;
return 0;
}
When i debug above application, str gets always loaded with the "EnglishCaption" text. \
When i change the regional settings to change the system locale to German(German) or change Display language of the system, it always shows "EnglishCaption" text only.
Why this happens. Why application does not pick up the string from the string table with German(Germany) language when i set the system locale to German(Germany). ???
Am I missing something ??