eso-azure-translate
v3.1.6
Published
Uses Azure to and generates Elder Scrolls Online localization files
Downloads
10
Readme
eso-azure-translate
Description
Uses Azure Cognitive Services to translate English strings to any language and generates the corresponding Lua files needed for Elder Scrolls Online.
Install
npm install -g eso-azure-translate
- Set ESO_TRANSLATOR environment variable with the key used to access the Azure services. Otherwise you can pass the token on the command line but that is not recommended.
Prepare
en.json
{
"STR_1": "A random string",
"STR_2": "Some other string ",
"SI_BINDING_NAME_SOME_BINDING": "Some binding name"
}
Bring your own translations.
Machine translations can be bad sometimes. If you already have good translations you can override Azure's by creating a corresponding JSON file for that language
{
"STR_2": "We are pretending this is a better French translation than Azure can give us"
}
Command line example
node .\dist\bin.js --inputDir="strings" --outputDir="lang"
Code example
const params = {
key = "<Your Azure Key>",
inputDirectory: 'strings',
outputDir: 'lang'
}
const ESOTranslate = require('eso-azure-translate').ESOTranslate;
await new ESOTranslate(params)
.translate();
Build
git clone https://[email protected]/MikeWestbrook/MikesNodeModules/_git/eso-azure-translate
cd eso-azure-translate
npm
npm run build