My code is from the demo
import React, { Component } from 'react';
import {
Text
} from 'react-native';
import I18n from 'react-native-i18n';
class Demo extends React.Component {
render() {
return (
<Text>{I18n.t('greeting')}</Text>
);
}
}
// Enable fallbacks if you want `en-US` and `en-GB` to fallback to `en`
I18n.fallbacks = true;
I18n.translations = {
en: {
greeting: 'Hi!'
},
fr: {
greeting: 'Bonjour!'
}
};
export default Demo;
I am getting

Thank you in advance! :)
I think you need to install react-native-i18n as well as ex-react-native-i18n
@SvetoslavSlavov Is the package correctly linked?
I got this error when I forgot to restart the app after installing and linking the package. Solved by running again.
It Worked perfectly for a long time.I'm experiencing g this error suddenly. How to resolve this
Most helpful comment
@SvetoslavSlavov Is the package correctly linked?