Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Patches for codeblocks about internationalization
heromyth:
--- Quote from: heromyth on August 13, 2005, 05:04:18 pm ---
However, I have confronted some strang problems during the process of translation. I can't translate these words belown:
--- Code: ---#: src\main.cpp:1057
#: src\main.cpp:1084
#: src\src-xrc.cpp:64
msgid "&File"
msgstr ""
--- End code ---
Not because they are too difficult to be translated, but because that once I have translated them, some of the sub-menu items will disappear. For example, I have just only translated "&Project". Now you can the result in the second attachment. The first attachement should be the correct. And you can see the third attachement which shows that I just leave "&Project" untranslated. Of course, the third is also correct.
--- End quote ---
All the problems have seemed to be fixed. See the first attachment. More details about the fixes can been seen in the second attachment. By now, I think using this patch can totally implement the internationalization of Code::Blocks v1.0 (CVS with wxWidgets v2.4.2).
[attachment deleted by admin]
liweifuj:
Hi Heromyth,
I am looking for a IDE because I have to work under Linux. Seen your production I am really getting exciting, because the English edition could not good support Chinese input, so can you switch a copy to me ? I use fctix as the Chinese input, but can not locate the character in the edit panel. My OS is FC4. Thanks.
David
heromyth:
--- Quote from: liweifuj on November 27, 2005, 11:16:34 am ---Hi Heromyth,
I am looking for a IDE because I have to work under Linux. Seen your production I am really getting exciting, because the English edition could not good support Chinese input, so can you switch a copy to me ? I use fctix as the Chinese input, but can not locate the character in the edit panel. My OS is FC4. Thanks.
David
--- End quote ---
I just compiled under Windows OS, and haven't tested it under Linux. I'am planning to port it to FreeBSD. It seems to have been done by someone.
The CB in CVS now supports Language Choice perfectly. You must check it out and compile it youself. Here are my codes of InitLocale() in app.cpp
--- Code: ---void CodeBlocksApp::InitLocale()
{
const wxString langs[] =
{
_T("(System default)"),
// _T("English (U.S.)")
// _T("English"),
_T("Chinese (Simplified)"),
// _T("German"),
// _T("Russian"),
};
// Must have the same order than the above
const long int locales[] =
{
wxLANGUAGE_DEFAULT,
// wxLANGUAGE_ENGLISH_US,
// wxLANGUAGE_ENGLISH,
wxLANGUAGE_CHINESE_SIMPLIFIED,
// wxLANGUAGE_GERMAN,
// wxLANGUAGE_RUSSIAN
};
int lng = Manager::Get()->GetConfigManager(_T("app"))->ReadInt(_T("/locale/language"),(int)-2);
if(lng==-2) // -2 = Undefined / ask
{
lng = -1;
if(WXSIZEOF(langs)>=2)
lng = wxGetSingleChoiceIndex(_T("Please choose language:"), _T("Language"),
WXSIZEOF(langs), langs);
if(lng >= 0 && (unsigned)abs(lng) < (unsigned)WXSIZEOF(locales))
lng = locales[lng];
else
lng = -1; // -1 = Don't use locale
}
ConfigManager *cfg = Manager::Get()->GetConfigManager(_T("app"));
if(lng>=0)
{
m_locale.Init(lng);
wxLocale::AddCatalogLookupPathPrefix(ConfigManager::GetDataFolder() + _T("/locale"));
wxLocale::AddCatalogLookupPathPrefix(wxT("."));
wxLocale::AddCatalogLookupPathPrefix(wxT(".."));
m_locale.AddCatalog(wxT("codeblocks"));
cfg->Write(_T("/locale/language"), (int)lng);
}
else
Manager::Get()->GetConfigManager(_T("app"))->Write(_T("/locale/language"),(int)-1);
}
--- End code ---
Navigation
[0] Message Index
[*] Previous page
Go to full version