eso-azure-translate
TypeScript icon, indicating that this package has built-in type declarations

3.1.6 • Public • Published

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://MikeWestbrook@dev.azure.com/MikeWestbrook/MikesNodeModules/_git/eso-azure-translate
cd eso-azure-translate
npm
npm run build

Readme

Keywords

none

Package Sidebar

Install

npm i eso-azure-translate

Weekly Downloads

1

Version

3.1.6

License

MIT

Unpacked Size

29.3 kB

Total Files

10

Last publish

Collaborators

  • albinopython