use-i18n-with-google-translate
v1.0.0
Published
Helper automated function to translate json file based on language like `english` to any other language through `google-translate`.
Downloads
3
Maintainers
Readme
useI18nWithGoogleTranslate 🐱🐉
Helper automated function to translate json file based on language like english
to any other language through google-translate
.
Created to be used in [
Breakpoint
] Project(s).
Installation
# npm
$ npm install use-i18n-with-google-translate
# yarn
$ yarn add use-i18n-with-google-translate
Usage
import useI18nWithGoogleTranslate from "use-i18n-with-google-translate";
useI18nWithGoogleTranslate(
inputFile, // input file path to read data(string)
outputFile, // output file path to write the result (string)
config // config object to setup the direction of translate default to { from: 'en', to: 'ar' }
); // return a promise