@nafuzi/firebase-auth-error-translator
TypeScript icon, indicating that this package has built-in type declarations

1.2.5 • Public • Published

Firebase auth error translator

Helps to translate firebase auth errors, you can translate the error to any of the available languages.


Use

import { getTranslatedError } from '@nafuzi/firebase-auth-error-translator'

const login = () => {
  try {
    await signInWithEmailAndPassword('johndoe@email.com', 'john123456')
  } catch (error) {
    console.log(getTranslatedError('pt', error.code))
  }
}

Available Languages

Here is a list of the available languages that you can use

  • Arabic: ar

  • Bengali: bn

  • German: de

  • English (default): en

  • Spanish: es

  • Persian: fa

  • French: fr

  • Hebrew: he

  • Indonesian: id

  • Italian: it

  • Japanese: ja

  • Korean: ko

  • Nepali: ne

  • Polish: pl

  • Portuguese: pt

  • Russian: ru

  • Thai: th

  • Turkish: tr

  • Vietnamese: vi

  • Chinese: zh

Translations

The translations are from the Firebase Documentation. (the language code is based in the ISO 639-1 rules).

Package Sidebar

Install

npm i @nafuzi/firebase-auth-error-translator

Weekly Downloads

0

Version

1.2.5

License

MIT

Unpacked Size

1.24 MB

Total Files

54

Last publish

Collaborators

  • gabrielnafuzi