british_american_translate

Translate between UK (en_GB) and USA (en_USA) English

Usage no npm install needed!

<script type="module">
  import britishAmericanTranslate from 'https://cdn.skypack.dev/british_american_translate';
</script>

README

british_american_translate

Translate strings between British (en_GB) and American (en_US) English

const translate = require("british_american_translate");

// translate UK to USA
const ukString = "I'm visualising the colour of this yoghurt";
console.log(translate.uk2us(ukString)); // "I'm visualizing the color of this yogurt"

// translate USA to UK
const usString = "I'm visualizing the color of this yogurt";
console.log(translate.us2uk(usString)); // "I'm visualising the colour of this yoghurt"

Errors return null

License

(C) 2018-19 P. Hughes. All rights reserved.

Shared under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported license.