Is there any available method to check if a key exists in the current language?
Currently if a key doesn't exist it returns a [missing "foo" translation], which I don't think its ideal.
You can use the in operator. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/in
import en from './locales/en'
if ('key' in en) {
// do something
}
Most helpful comment
You can use the in operator. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/in