Actually react-native-languages doesn't support exact i18n translation directly..it just delegates works to other i18n library(https://github.com/fnando/i18n-js is quoted in README), so I've modified the namespace of generated file and update example module to use react-native-languages.
Then...should we rename the lib name to i18n-ts? 🤔
declare module "i18n-js" {
var fallbacks: boolean;
var translations: {
[keys: string]: any;
};
var defaultLocale: string;
var locale: string;
function currentLocale(): string;
function t(key: "title"): string;
}
declare module "*.json" {
const value: any;
export default value;
}
Issue
resolves https://github.com/quipper/react-native-i18n-ts/issues/5
Overview
https://github.com/AlexanderZaytsev/react-native-i18n has become obsolete and https://github.com/react-community/react-native-languages would be the next popular i18n library among RN community.
Actually react-native-languages doesn't support exact i18n translation directly..it just delegates works to other i18n library(https://github.com/fnando/i18n-js is quoted in README), so I've modified the namespace of generated file and update example module to use react-native-languages.
Then...should we rename the lib name to
i18n-ts
? 🤔