Project

anglicize

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Converts strings from American spelling to English spelling and vice versa.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
 Project Readme

Anglicize¶ ↑

<img src=“https://badge.fury.io/rb/anglicize.svg” alt=“Gem Version” />

Anglicize is a simple gem that converts strings between American and English spellings, based on the list of alternate spellings at [www.tysto.com/uk-us-spelling-list.html].

For example:

  • “Blue Is The Warmest Color”.anglicize == “Blue Is The Warmest Colour”

  • “Blue Is The Warmest Colour”.americanize == “Blue Is The Warmest Color”

The methods provided will retain the case of the original string.

Installation¶ ↑

Add this to your Gemfile and run the bundle command.

gem "anglicize"

Getting Started¶ ↑

The gem adds the following methods to the String object:

  • anglicize - return a copy of the string converted to English spelling

  • anglicize! - convert the string in-place to English spelling

  • has_alternate_english_spelling? - returns true if English spelling of string is different

  • americanize - return a copy of the string converted to American spelling

  • americanize! - convert the string in-place to American spelling

  • has_alternate_american_spelling? - returns true if American spelling of string is different

  • copy_case - applies the case of the string parameter and returns the resultant string

  • copy_case! - changes the case of the string to the case of the string parameter