@nafuzi/firebase-auth-error-translator
v1.2.5
Published
Get firebase auth error translated
Downloads
16
Maintainers
Readme
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('[email protected]', '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).