12345678910111213141516171819202122232425262728293031323334 |
- // SPDX-FileCopyrightText: Adam Evyčędo
- //
- // SPDX-License-Identifier: AGPL-3.0-or-later
- package transformers
- import (
- "golang.org/x/text/transform"
- )
- //nolint:gochecknoglobals
- var TransformerDE transform.Transformer = Replace(func(r rune) []rune {
- switch r {
- case 'ö':
- return []rune{'o', 'e'}
- case 'Ö':
- return []rune{'O', 'e'}
- case 'ä':
- return []rune{'a', 'e'}
- case 'Ä':
- return []rune{'A', 'e'}
- case 'ß':
- return []rune{'s', 's'}
- case 'ẞ':
- return []rune{'S', 'S'}
- case 'ü':
- return []rune{'u', 'e'}
- case 'Ü':
- return []rune{'U', 'e'}
- default:
- return []rune{r}
- }
- })
|