- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 05:05 AM
Hi Team,
I have solved translation of the umlauts like below code working as expected
ä ---> ae
ë ---> e
ï ---> i
ö ---> oe
ü ---> ue
ÿ ---> y
ß --> ss
please help me how to translation of the umlauts like above.
Thanks & Regards,
Bandi
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 06:30 AM
Hi @Community Alums
You can try below-
function replaceSpecialCharacters(inputString) {
var replacements = {
'ä': 'ae',
'ë': 'e',
'ï': 'i',
'ö': 'oe',
'ü': 'ue',
'ÿ': 'y',
'ß': 'ss'
};
for (var ch in replacements) {
if (replacements.hasOwnProperty(ch)) {
inputString = inputString.split(ch).join(replacements[ch]);
}
}
return inputString;
}
var inputString = "sauäëïöüÿßrabh";
var result = replaceSpecialCharacters(inputString);
gs.info(result);
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 01:14 AM
Hi Gupta,
I am expecting capital letter O and small e(Oe) with bove code i am getting small 'oe ' for example
For example, it should be Yusuf Oeztuerk, not Yusuf oeztuerk.
how to change only for Capital letter O
Thanks & Regards,
Pavana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2024 04:36 AM
Thank you it's working using your code Surabh