[sword-devel] How to get translated book abbreviations with LocaleMgr?
Troy A. Griffitts
scribe at crosswire.org
Sun May 17 23:37:47 MST 2020
Right, so, it's going to be different per module, so I would do something like:
VerseKey *vk = (VerseKey *)currentBible->getKey();
for ((*vk) = TOP; !vk->popError(); vk->setBook(vk->getBook() + 1)) {
cout << vk->getBookAbbrev();
}
On May 17, 2020 11:27:32 PM MST, Tobias Klein <contact at tklein.info> wrote:
>On 5/15/20 8:22 PM, Troy A. Griffitts wrote:
>> The other sections (sections besides [Text] in SWORD's locale files
>> are not specifically for directly translation. They are used by
>> SWORD's verse parser VerseKey translation, etc.
>
>Let me explain my actual use case.
>
>After doing a module search I'm generating a bar chart that visualizes
>search results per bible book. It looks like this at the moment:
>https://paste.pics/073e805fc1a74db1e7899aefaf838e86
>
>In that bar chart I'm using the book abbreviations as labels on the
>x-axis of the chart. I'm simply using the abbreviations, because the
>full book names would take up too much vertical screen space in this
>particular case.
>
>That's why I was asking for a direct method for translating the Abbrev.
>
>strings, since I don't need the abbreviations for individual verses
>(then the VerseKey based approach would totally make sense), but in
>this
>case I simply need to generate an array with all the book names
>(abbreviations) to use as labels for the x-axis of the chart.)
>
>I can work with the existing API, but for this particular use case it's
>
>certainly a bit odd (from an object-oriented standpoint), because I'm
>not dealing with individual verses in this case.
>
>Best regards,
>Tobias
>
>
>_______________________________________________
>sword-devel mailing list: sword-devel at crosswire.org
>http://www.crosswire.org/mailman/listinfo/sword-devel
>Instructions to unsubscribe/change your settings at above page
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20200517/a3be2e61/attachment.html>
More information about the sword-devel
mailing list