top

Package langreg is a library for validating ISO 639-1 language and ISO 1366-1_alpa-2 region codes.

ISO 639-1 language codes are two charcters long and use only lowercase ASCII character a-z. E.g.:

"en", "es", "ru"

ISO 1366-1_alpa-2 region codes are two charcters long and use only uppercase ASCII character A-Z. E.g.:

"US", "UK", "ZA"

When combined as a composite language and region code, they are concatented with an underscore. E.g.:

"en_US", "en_ZA", "fr_FR"

Any codes not meeting these formatting requirement will fail validation.

Test imports 1 package(s) ΒΆ

  1. github.com/smartystreets/goconvey/convey