Romanchuk / angular-i18next

angular v10+ integration with i18next v19.4+
MIT License
131 stars 33 forks source link

Check if there is a translation for the specified key #112

Closed david2242 closed 9 months ago

david2242 commented 1 year ago

I see that in i18next there is an .exists('tranlation.key') method which returns a boolean if a translation string is available for the specific key. In I18NextPipe.d.ts, the exists function isn't exported, so it is not available in this angular package. Is it possible to export it? Or am I able to check for it any other way?

Romanchuk commented 1 year ago

@david2242 Hello!

exists method is available in this package. It is in I18NextService. I18NextService exports all i18next methods as-is.

I18NextPipe only translates keys (calls .t() method) it is designed for it.