ILibCaseMapper constructor
locale locale to use when loading the mapper
direction "toupper" for upper-casing, or "tolower" for lower-casing.
Default if not specified is "toupper".
Implementation
ILibCaseMapper({String? locale, String? direction})
: up = direction == null || direction == 'toupper',
locale = locale != null ? ILibLocale(locale) : ILibLocale() {
if (up) {
mapData = <String, String>{
'ß': 'SS', // German
'ΐ': 'Ι', // Greek
'ά': 'Α',
'έ': 'Ε',
'ή': 'Η',
'ί': 'Ι',
'ΰ': 'Υ',
'ϊ': 'Ι',
'ϋ': 'Υ',
'ό': 'Ο',
'ύ': 'Υ',
'ώ': 'Ω',
'Ӏ': 'Ӏ', // Russian and slavic languages
'ӏ': 'Ӏ'
};
} else {
mapData = <String, String>{
'Ӏ': 'Ӏ' // Russian and slavic languages
};
}
const Set<String> specialLanguages = <String>{
'az',
'tr',
'crh',
'kk',
'krc',
'tt'
};
if (specialLanguages.contains(this.locale.getLanguage())) {
_setUpMap('iı', 'İI');
}
}