Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AllLocales = []string{
"en",
"ashkenazi",
"he",
"he-x-NoNikud",
"ashkenazi_komatz",
"ashkenazi_litvish",
"ashkenazi_poylish",
"ashkenazi_romanian",
"ashkenazi_standard",
"de",
"es",
"fi",
"fr",
"hu",
"nl",
"pl",
"pt",
"ro",
"ru",
"uk",
"yi",
}
AllLocales lists every supported Hebcal locale name, in priority order.
View Source
var Catalog = catalog.NewBuilder()
Catalog holds every Hebcal translation, keyed by BCP-47 language.Tag.
Functions ¶
func HebrewStripNikkud ¶
Example ¶
package main
import (
"fmt"
"github.com/hebcal/locales"
)
func main() {
src := "וְהָאָ֗רֶץ הָיְתָ֥ה תֹ֙הוּ֙ וָבֹ֔הוּ"
dest := locales.HebrewStripNikkud(src)
fmt.Println(dest)
}
Output: והארץ היתה תהו ובהו
func LookupTranslation ¶
LookupTranslation returns the translated message for key in the given locale. It returns ok=false when no translation exists (the key is returned as-is).
"en", "sephardic" and "" are pass-through locales. For dictionary locales, the catalogue never stores identity translations, so a Sprintf result equal to the key reliably means "not found".
Types ¶
This section is empty.
Source Files
¶
- catalog.go
- nikud.go
- strings_ashkenazi.go
- strings_ashkenazi_komatz.go
- strings_ashkenazi_litvish.go
- strings_ashkenazi_poylish.go
- strings_ashkenazi_romanian.go
- strings_ashkenazi_standard.go
- strings_de.go
- strings_es.go
- strings_fi.go
- strings_fr.go
- strings_he.go
- strings_he_x_NoNikud.go
- strings_hu.go
- strings_nl.go
- strings_pl.go
- strings_pt.go
- strings_ro.go
- strings_ru.go
- strings_uk.go
- strings_yi.go
Click to show internal directories.
Click to hide internal directories.