Skip to content

Angularjs directive and angularjs filter; which use latinize.js to convert accents (diacritics) from strings to latin characters.

License

Notifications You must be signed in to change notification settings

eraycetinay/ng-latinize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ng Latinize

npm version Bower dependency Status license

Angularjs directive and angularjs filter; which use latinize.js to convert accents (diacritics) from strings to latin characters.

Installation

npm install ng-latinize
bower install ng-latinize

Features

  • Using as directive and filter.
  • Delete inappropriate characters
  • Capitalization option.

Usage

  • Add latinize.js and ng-latinize.js to your source.
<script src="bower_components/latinize/latinize.js"></script>
<script src="bower_components/ng-latinize/dist/ng-latinize.js"></script>

Basic Setup

  • Add ng-latinize directive to your input element.
<input type="text" ng-model="test" ng-latinize />
  • Add ngLatinize filter anywhere you need.
{{ text | ngLatinize }}

Capitalize Setup

  • Add capitalize param to your input or variable
<input type="text" ng-model="test" data-capitalize="true" ng-latinize />
{{ anothertext | ngLatinize:true }}

Example

If you enter ỆᶍǍᶆṔƚÉ áéíóúýčďěňřšťžů to the input below.

<input type="text" ng-model="accentedLetter" />
{{ accentedLetter | ngLatinize:true }}

It will convert the string to EXAMPLE AEIOUYCDENRSTZU.

License

MIT license.

About

Angularjs directive and angularjs filter; which use latinize.js to convert accents (diacritics) from strings to latin characters.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published