i think you are trying to get locale name aka greek.catalog
Code: Select all
LocaleName =GetLanguageInfo(GetSystemLanguage()).Name
DebugPrint(LocaleName)
the above code should provide locale default name, path is as explained in manual of
OpenCatalog()
so OpenCatalog("MyProgram.catalog") in me, will open
<current-directory>/Catalogs/greek/MyProgram.catalog
an idea is to have as first String in your file locale so
; First line declare your languan
greek
;
blah blah line 2
;
blah blah blah line 3
therefore by checking first catalog string, you get languange and also can check if is correctly loaded, since string will be empty otherwise.
this offcourse is vulnerable to human mistakes but.. its an idea!
check also SpawnPPC who did a similiral thing
https://forums.hollywood-mal.com/viewto ... 990#p20990
p.s.
your last question about deutch/german ,
practically all shall use international eka german, (the one system returns)
also there is NO savecatalog so, someone manualy shall save it.
so there is no bulletproof way to check what catalog has opened (request in wihlist)
a possible workaround would be to check using
Exists() if the international directory name exist, then make a change, and reload to see if it there, otherwise delete newlly created file, i know its complicated but
as final note you may use ,
OpenFile() and not
OpenCatalog() , you have more control, and catalog is not that compilcated to interpret yourself
