1.2.5 • Published 3 years ago
@nafuzi/firebase-auth-error-translator v1.2.5
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).