Drop encoding part from locale (it's not used in constructing localized keys).
Locale string with encoding part dropped out or original string if encoding was not present.
assert("ru_RU.UTF-8".dropEncodingPart() == "ru_RU"); string locale = "ru_RU"; assert(locale.dropEncodingPart() is locale);
See Implementation
Drop encoding part from locale (it's not used in constructing localized keys).