Hi Sword-devel'ers,
>> How
are you actually doing the i18n? From this end it sounds like you
>> might actually be maintaining separate codebases or something rather >> than using different resource files to swap strings. Maybe I just >> missed something in an earlier post. The quasi-internationalized versions of the LcdBible software use a very simple approach to accomplishing an "80/20" degree of internationalization. The "plug-in subset" of CanonVersifier.inl (replacement for Canon.h and VerseKey) has #defines that distinct Microsoft Visual C++ projects control: #define TRANS_NT_SPANISH=1
#define TRANS_NT_GERMAN=1
#define TRANS_NT_FRENCH=1
In the LcdBibleDlg.cpp code, these same #defines control what module is
opened, and what phrase is used for the "Search Phrase" text.
#if TRANS_NT_GERMAN == 1
m_pRawVerse = new RawVerse("modules\\texts\\rawtext\\GERLUT", O_RDONLY); m_searchPhraseButton.SetWindowText("Suche Nach:"); #elif TRANS_NT_SPANISH == 1 m_pRawVerse = new RawVerse("modules\\texts\\rawtext\\SPARV", O_RDONLY); m_searchPhraseButton.SetWindowText("Búsqueda Para:"); #elif TRANS_NT_FRENCH == 1 m_pRawVerse = new RawVerse("modules\\texts\\rawtext\\FRELSG", O_RDONLY); m_searchPhraseButton.SetWindowText("Recherche De:"); #elif TRANS_NT_FINNISH == 1 m_pRawVerse = new RawVerse("modules\\texts\\rawtext\\xxxxx", O_RDONLY); #elif TRANS_NT_GREEK == 1 m_pRawVerse = new RawVerse("modules\\texts\\rawtext\\xxxxx", O_RDONLY); #elif TRANS_NT_ITALIAN == 1 m_pRawVerse = new RawVerse("modules\\texts\\rawtext\\xxxxx", O_RDONLY); #elif TRANS_NT_ICELAND == 1 m_pRawVerse = new RawVerse("modules\\texts\\rawtext\\xxxxx", O_RDONLY); #else m_pRawVerse = new RawVerse("modules\\texts\\rawtext\\WEB", O_RDONLY); #endif That's pretty much it. The above probably doesn't scale well, but sufficed
for quick/dirty 80/20 implementation to meet the Friday COB
milestone. >> If you're using Sword, there are some i18n routines built in I
believe.
>> Aside from that, if i18n/l10n are real goals, you should consider >> using ICU, since its features are much more robust than those in Sword. >> You'll definitely want to consider ICU for InVerse, since it has some >> very nice international calender data (localized weekdays & months, >> different religious calendars, local holidays, etc.). A primary objective of LcdBible is a
very small download. Each of the self-contained, statically linked
LcdBible.exe for the above is only 32kb. I can't imagine that being
possible with the full sword-api and/or use of icu. (See preliminary
requirements / design document)
A peripheral object of LcdBible is to identify and
implement a radically simplified "plug-in subset" of the sword-api. That is
taking place based on experience gained with LcdBible. LcdBible uses the
radically simplified CanonVersifier and simplified RawText classes to fetch
verses. I will eventually be proposing parent/contained classes for
VerseKey and RawText to facilitate other apps for which this might be
advantageous. The actually logic should be radically simpler for a sword
newbie volunteer to follow, as applicable.
(This could be accomplished with using something
like
#define PLUGIN_SUBSET
but this would adversely impact readability and
)
Another peripheral objective is to implement actual
.dll and .lib logic to facilitate "plug-ins". Experience with LcdBible seems to
indicate this should be feasible. Once someone has "paid the price" of the
8.5meg "Starter-Set", subsequent plug-ins should be very small, and be on
the order of a "why not" decision. Or the starter-set could include the
smaller plug-ins???
Another peripheral objective of LcdBible is to
significally improve developer rebuild delays. Use of CanonVersifier.inl allows
precompiled headers to work ok, which drastically improves rebuild times.
<An aside: Canon.h has defined arrays for some
no-doubt good reasons, but this also creates problems for data abstraction
and data hiding)>
>> I only wrestled with uncompressed Bible texts >> * The installation routine words aren't translated. >> * The titlebar isn't translated >> * I'm not clear if all these use the same versification, but assumed this >> was the case > If they're Sword modules, they do, but in reality they don't. (French > versification being famously distinct from English.) I don't understand the above, but, for now, not too
concerned. 80/20.
<For those not clear on my use of 80/20, this
derives from the Italian economist Pareto for achieving 80% of the
advantages with 20% of the effort>
Sharing the reason for the season,
- Lynn A.
|
Title: [sword-devel] Quasi-internationalized versions of LcdBible available (spanish-rv, french-lsg, german-lut)