Skip to content

@gracious.tech/fetch-client / translation / TranslationExtra

Class: TranslationExtra

translation.TranslationExtra

Access to local book names, sections, and chapter headings for a translation

Methods

get_book_name

get_book_name(book): Object

Get local name data for a book. This will throw if the book doesn’t exist or will contain empty strings if no data available. You should call get_books() on the collection instance for more intuitive access. It will automatically make use of local name data after fetching it.

Parameters

NameType
bookstring

Returns

Object

NameTypeDescription
normalstringWARN All of these may be an empty string if the data isn’t available
longstring-
abbrevstring-

Defined in

client/src/translation.ts:33


get_chapters

get_chapters(book): { number: number ; heading: string }[]

Get list of chapters for book which also includes a heading property for each

Parameters

NameType
bookstring

Returns

{ number: number ; heading: string }[]

Defined in

client/src/translation.ts:41


get_chapter_heading

get_chapter_heading(book, chapter): string

Get the heading for a specific chapter

Parameters

NameType
bookstring
chapternumber

Returns

string

Defined in

client/src/translation.ts:48


get_sections

get_sections(book): { start_chapter: number ; start_verse: number ; end_chapter: number ; end_verse: number ; heading: string }[]

Get list of sections for a book which includes a heading for each and verse range

Parameters

NameType
bookstring

Returns

{ start_chapter: number ; start_verse: number ; end_chapter: number ; end_verse: number ; heading: string }[]

Defined in

client/src/translation.ts:54