-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support special string operations for Turkish and Azeri languages #10147
Comments
According to the Godoc of https://pkg.go.dev/strings#ToLowerSpecial
Where do we get the "special casing rules" for a given language? |
I think they are already implemented in the Besides the functions in the package main
import (
"fmt"
"unicode"
)
func main() {
t := unicode.TurkishCase
const lci = 'i'
fmt.Printf("%#U\n", t.ToLower(lci))
fmt.Printf("%#U\n", t.ToTitle(lci))
fmt.Printf("%#U\n", t.ToUpper(lci))
const uci = 'İ'
fmt.Printf("%#U\n", t.ToLower(uci))
fmt.Printf("%#U\n", t.ToTitle(uci))
fmt.Printf("%#U\n", t.ToUpper(uci))
} And the output is:
|
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help. |
This is a relevant feature for increasing Hugo i18n support. |
Turkish
tr
and Azeriaz
languages distinguish dotted and dotlessi
andI
in their typesetting. For the correct typesetting in these languages, we need to convert lowercase dottedi
to uppercase dottedİ
(forupper
) and uppercase dotlessI
to lowercase dotlessı
(forlower
).Golang already supports the special string mappings for these languages using the functions:
Adding this feature to Hugo will improve Turkish and Azeri language support.
The text was updated successfully, but these errors were encountered: