21#if defined(BI_MULTI_THREAD_RTL)
37static const tchar*
const null_string =
_T(
"");
44#define AUTOLANG_CACHEDNEUT 0x02
45#define AUTOLANG_CACHEDLOAD 0x01
70#if defined(BI_MULTI_THREAD_RTL)
81#if defined(BI_MULTI_THREAD_RTL)
98#if defined(BI_MULTI_THREAD_RTL)
122 void*
operator new(
size_t size,
int buflen);
123#if defined(BI_COMP_MSC)
124 void operator delete(
void* p,
int buflen);
142_TLocaleCacheBase::_TLocaleCacheBase(
const tchar*
name,
long hash)
148 GetLocaleCacheList().AddLink(
this);
151void* _TLocaleCache::operator
new(
size_t size,
int buflen)
153 return ::operator
new(size+
buflen);
155#if defined(BI_COMP_MSC)
156void _TLocaleCache::operator
delete(
void* p,
int)
162_TLocaleCache::_TLocaleCache(
const tchar*
name,
long hash,
187 if (TLocaleString::CompareLang(
pc,
neut,TLocaleString::NativeLangId) != 0)
194 HRSRC resHdl = ::FindResource(TLocaleString::Module ? TLocaleString::Module :
201 HGLOBAL resData = ::LoadResource(TLocaleString::Module ? TLocaleString::Module :
221 while ((
c=*
pr++) >=
_T(
' ')) ;
222 if (
static_cast<int>(
pr-p) >
maxLen)
232_TLocaleCache::Translate(TLangId
reqLang)
252 if ((
resData = ::LoadResource(TLocaleString::Module ? TLocaleString::Module :
265 while ((
c = *
pr) != 0) {
285 for ( ; *
pr >=
_T(
' '); ++
pr)
313_TLocaleCacheList::~_TLocaleCacheList()
365 if ((
cache = GetLocaleCacheList().Lookup(Private)) ==
nullptr)
367 Private =
cache->Buf;
372 if ((
cache = GetLocaleCacheList().Lookup(Private)) ==
nullptr)
373 return (Private =
nullptr);
374 Private =
cache->Buf;
384TLocaleString::operator
const tchar*()
const
386 if (Private ==
nullptr)
389 switch (Private[0]) {
412 return CompareLang(this->Translate(
lang), str,
lang);
418 return lang == NativeLangId ||
lang == (NativeLangId & 0x00FF);
Definition of class TAppDictionary.
Definition of class TApplication.
TLocaleString - localized name support.
#define AUTOLANG_LOAD
indicates resource name to load (binary)
#define AUTOLANG_XLAT
indicates name to be localized (binary)
#define AUTOLANG_RCID
indicates name specified by numeric ID
#define AUTOLANG_CACHEDNEUT
#define AUTOLANG_CACHEDLOAD
Object Windows Library (OWLNext Core)
owl::uint16 TLangId
Holds a language ID, a predefined number that represents a base language and dialect.
const TLangId InvalidLangId
const TLangId LangNeutral
const TLangId LangUserDefault
TAppDictionary & OWLGetAppDictionary()
Global exported TAppDictionary in Owl.
const TLangId LangSysDefault
General definitions used by all ObjectWindows programs.
static TLangId SystemDefaultLangId
The default language identifier.
static TLangId GetSystemLangId()
platform-dependent implementation
static TLangId UserDefaultLangId
The user-defined default language identifier.
static TLangId GetUserLangId()
platform-dependent implementation
static HINSTANCE Module
The handle of the file containing the resource.
static TLocaleString Null
reference a null string