🚀 DAY 2 OF LAUNCH WEEK: Unify Your Security Stack with Socket Basics.Learn more
Socket
Book a DemoInstallSign in
Socket

@hebcal/locale-base

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@hebcal/locale-base

Jewish holiday translations/transliterations

unpublished
latest
Source
npmnpm
Version
0.8.0
Version published
Maintainers
1
Created
Source

@hebcal/locale-base

Jewish holiday translations/transliterations

Locale

A locale in Hebcal is used for translations/transliterations of holidays. @hebcal/core supports four locales by default

  • en - default, Sephardic transliterations (e.g. "Shabbat")
  • ashkenazi - Ashkenazi transliterations (e.g. "Shabbos")
  • he - Hebrew (e.g. "שַׁבָּת")
  • he-x-NoNikud - Hebrew without nikud (e.g. "שבת")

Kind: global class

Locale.lookupTranslation(id, [locale]) ⇒ string

Returns translation only if locale offers a non-empty translation for id. Otherwise, returns undefined.

Kind: static method of Locale

ParamTypeDescription
idstringMessage ID to translate
[locale]stringOptional locale name (i.e: 'he', 'fr'). Defaults to active locale.

Locale.gettext(id, [locale]) ⇒ string

By default, if no translation was found, returns id.

Kind: static method of Locale

ParamTypeDescription
idstringMessage ID to translate
[locale]stringOptional locale name (i.e: 'he', 'fr'). Defaults to active locale.

Locale.addLocale(locale, data)

Register locale translations.

Kind: static method of Locale

ParamTypeDescription
localestringLocale name (i.e.: 'he', 'fr')
dataLocaleDataparsed data from a .po file.

Locale.addTranslation(locale, id, translation)

Adds a translation to locale, replacing any previous translation.

Kind: static method of Locale

ParamTypeDescription
localestringLocale name (i.e: 'he', 'fr').
idstringMessage ID to translate
translationstringTranslation text

Locale.addTranslations(locale, data)

Adds multiple translations to locale, replacing any previous translations.

Kind: static method of Locale

ParamTypeDescription
localestringLocale name (i.e: 'he', 'fr').
dataLocaleDataparsed data from a .po file.

Locale.useLocale(locale)

Activates a locale. Throws an error if the locale has not been previously added. After setting the locale to be used, all strings marked for translations will be represented by the corresponding translation in the specified locale.

Kind: static method of Locale

ParamTypeDescription
localestringLocale name (i.e: 'he', 'fr')

Locale.getLocaleName() ⇒ string

Returns the name of the active locale (i.e. 'he', 'ashkenazi', 'fr')

Kind: static method of Locale

Locale.getLocaleNames() ⇒ Array.<string>

Returns the names of registered locales

Kind: static method of Locale

Locale.ordinal(n, [locale]) ⇒ string

Kind: static method of Locale

ParamTypeDescription
nnumber
[locale]stringOptional locale name (i.e: 'he', 'fr'). Defaults to active locale.

Locale.hebrewStripNikkud(str) ⇒ string

Removes nekudot from Hebrew string

Kind: static method of Locale

ParamType
strstring

Keywords

hebcal

FAQs

Package last updated on 22 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts