Last updated:
0 purchases
latinize
Latinize #
Simple library to convert accents (diacritics) from strings to latin characters.
Installation #
Add the following line to your pubspec.yaml file:
latinize: '>=0.0.1 <1.0.0'
copied to clipboard
And then:
pub get
copied to clipboard
or
flutter pub get
copied to clipboard
Usage #
import 'package:latinize/latinize.dart';
latinize('ỆᶍǍᶆṔƚÉ áéíóúýčďěňřšťžů'); // => ExAmPlE aeiouycdenrstzu
copied to clipboard
You can use the extendSymbolTable function to add or override symbols:
// modify the behavior for German umlauts
extendSymbolTable({
'Ä': 'Ae',
'Ä': 'Ae',
'Ü': 'Ue',
'ä': 'ae',
'ö': 'oe',
'ü': 'ue'
});
copied to clipboard
Then when you call latinize you'll get the overwritten symbols:
latinize('ÄÜ') // => AeUe
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.