[sword-devel] Thai locales

Troy A. Griffitts sword-devel@crosswire.org
Thu, 04 Jul 2002 05:06:09 -0700


Adrian,

> COOL! It is rather neat to see the updates and now to be able to see Thai
> books listed and menus and interface in Thai. It works on Windows 98 Thai
> (and as expected not on English). I have attached initial attempts to code
> the Thai display and books list. As well as one screen shot of the Thai text
> showing the verse number elevated over the Heading.

Thanks!  This is a great start.  I will try to get the book dropdown to 
show unicode.


> One error message (repeated for each book) comes up now when starting the
> program with language Thai. The error dialog box is also attached. What is
> the 'matching toupers abbrev' entry and how should it be done?

The engine locale file requires there to be one abbreviation for each 
translated book name that is EXACTLY a toupper() of each character in 
the bookname translation.  I would guess that toupper() probably does 
nothing with Thai, so you can probably just use your book translation 
texts as the abbreviation entries.  Let me know if this makes sense or not.

	-Troy.





> 
> Adrian
> 
> 
> ----- Original Message -----
> From: "Troy A. Griffitts" <scribe@crosswire.org>
> To: <sword-devel@crosswire.org>
> Sent: Tuesday, June 25, 2002 3:24 PM
> Subject: [sword-devel] win32 1.5.4BetaI
> 
> 
> 
>>Not much new.  More internationalization (i18n) strings added.  Still
>>not all done yet.  I've also added the ability to replace the back and
>>search bitmaps with locale specific ones.  Just add the bitmap filename
>>as the translation string.  I'm just gonna paste the code here and
>>anyone who wants to fiddle with making a new locale can fiddle away.
>>Also included are the en back and search bitmaps.
>>
>>Happy testing.
>>
>>
> 
> http://www.crosswire.org/sword/ALPHAcckswwlkrfre22034820285912/alpha/sword-1
> .5.4BetaI.zip
> 
>>__________
>>
>>i12ize code:
>>
>>
>>void TForm1::i12ize(const char *lang) {
>>      LocaleMgr::systemLocaleMgr.setDefaultLocaleName(lang);
>>
>>      // TODO: add mainmgr->configpath, or something, to beginning of
>>these image names
>>      const char *tmp;
>>      Graphics::TBitmap *bitmap = 0;
>>      TPicture *pic = new TPicture();
>>
>>      ImageList1->Clear();
>>
>>      tmp = _tr("BackBtnImage");
>>      if (strcmp("BackBtnImage", tmp)) {
>>           pic->LoadFromFile(tmp);
>>           bitmap = pic->Bitmap;
>>      }
>>      else bitmap = BackBtnImage->Picture->Bitmap;
>>
>>      TColor transColor = bitmap->Canvas->Pixels[0][0];
>>      ImageList1->AddMasked(bitmap, transColor);
>>
>>      tmp = _tr("SearchBtnImage");
>>      if (strcmp("SearchBtnImage", tmp)) {
>>           pic->LoadFromFile(tmp);
>>           bitmap = pic->Bitmap;
>>      }
>>      else bitmap = SearchBtnImage->Picture->Bitmap;
>>
>>      transColor = bitmap->Canvas->Pixels[0][0];
>>      ImageList1->AddMasked(bitmap, transColor);
>>
>>      bitmap = BookmarkBtnImage->Picture->Bitmap;
>>      transColor = bitmap->Canvas->Pixels[0][0];
>>      ImageList2->AddMasked(bitmap, transColor);
>>
>>      delete pic;
>>/*
>>      ImageList1->Clear();
>>      Graphics::TBitmap *bitmap = BackBtnImage->Picture->Bitmap;
>>      TColor transColor = bitmap->Canvas->Pixels[0][0];
>>      ImageList1->AddMasked(bitmap, transColor);
>>
>>      bitmap = SearchBtnImage->Picture->Bitmap;
>>      transColor = bitmap->Canvas->Pixels[0][0];
>>      ImageList1->AddMasked(bitmap, transColor);
>>
>>      bitmap = BookmarkBtnImage->Picture->Bitmap;
>>      transColor = bitmap->Canvas->Pixels[0][0];
>>      ImageList2->AddMasked(bitmap, transColor);
>>*/
>>
>>
>>      File1->Caption = _tr("&File");
>>      SaveLayout1->Caption = _tr("S&ave Layout");
>>      Exit1->Caption = _tr("E&xit");
>>      Edit1->Caption = _tr("&Edit");
>>      Copy2->Caption = _tr("&Copy");
>>      Copy3->Caption = _tr("&Copy");
>>      Copy4->Caption = _tr("&Copy");
>>      Options2->Caption = _tr("Options");
>>      Options1->Caption = _tr("&Preferences...");
>>      Search1->Caption = _tr("&Search");
>>      NewSearchWindow1->Caption = _tr("&New Search Window");
>>      Tools1->Caption = _tr("&Tools");
>>      InstallManager1->Caption = _tr("Install Manager");
>>      Help1->Caption = _tr("&Help");
>>      Contents1->Caption = _tr("Contents");
>>      DevotionaloftheDay1->Caption = _tr("Devotional of the Day");
>>      About1->Caption = _tr("&About");
>>      Bookmarkbtn->Caption = _tr("Bookmark");
>>      DictionaryLookup1->Caption = _tr("Dictionary Lookup");
>>      DictionaryLookup2->Caption = _tr("Dictionary Lookup");
>>      EditEntry1->Caption = _tr("&Edit Entry");
>>      DeleteEntry1->Caption = _tr("&Delete Entry");
>>      LinktoVerse1->Caption = _tr("Link to Comment for Verse...");
>>      AddBookmark1->Caption = _tr("&Add Bookmark");
>>      EditBookmarks1->Caption = _tr("&Edit Bookmarks / Tree View...");
>>
>>      // ModInstForm
>>      ModInstFrm->Caption = _tr("Found New Module...");
>>      ModInstFrm->OkBtn->Caption = _tr("OK");
>>
>>      // ModVisForm
>>      ModVisForm->Caption = _tr("Check Modules To Show As Tabs");
>>      ModVisForm->modList->Columns->Items[0]->Caption = _tr("Module");
>>      ModVisForm->modList->Columns->Items[1]->Caption =
> 
> _tr("Description");
> 
>>      ModVisForm->OkBtn->Caption = _tr("OK");
>>      ModVisForm->CancelBtn->Caption = _tr("Cancel");
>>
>>      // NewBMfrm
>>      NewBMfrm->Caption = _tr("Add New Bookmark File");
>>      NewBMfrm->Label1->Caption = _tr("File Name (without extension):");
>>      NewBMfrm->Label2->Caption = _tr("Bookmark Section Title:");
>>      NewBMfrm->OkBtn->Caption = _tr("OK");
>>      NewBMfrm->CancelBtn->Caption = _tr("Cancel");
>>
>>      // OptionsForm
>>      Optionsfrm->Caption = _tr("Preferences");
>>      Optionsfrm->TabSheet1->Caption = _tr("General");
>>      Optionsfrm->TabSheet2->Caption = _tr("Special Modules");
>>      Optionsfrm->TabSheet3->Caption = _tr("Display");
>>
>>      //searchForm
>>      searchForm->Caption = _tr("Search...");
>>      searchForm->searchBtn->Caption = _tr("Search");
>>      searchForm->searchTypeGroup->Caption = _tr("Search Type");
>>      searchForm->searchTypeGroup->Items->CommaText = _tr("\"Mult
>>Word\",\"Phrase\",\"Regular Expression\"");
>>      searchForm->caseSensitiveCkBx->Caption = _tr("Case Sensitive");
>>      searchForm->searchOptionsGroup->Caption = _tr("Search Options");
>>      searchForm->scopeGroup->Caption = _tr("Scope");
>>      searchForm->scopeGroup->Items->CommaText = _tr("\"Entire
>>Module\",\"Current Results\",\"Custom Range\"");
>>      searchForm->customRangeBtn->Caption = _tr("Define Custom Range");
>>      searchForm->resultsLV->Columns->Items[0]->Caption =
> 
> _tr("Reference");
> 
>>      searchForm->resultsLV->Columns->Items[1]->Caption =
> 
> _tr("Preview...");
> 
> 
> 
> ----------------------------------------------------------------------------
> ----
> 
> 
> 
> 
> 
> 
> ----------------------------------------------------------------------------
> ----
> 
> 
> 
> 
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.370 / Virus Database: 205 - Release Date: 05/06/02