From 33f8733106df5fcbc23d9fddf55fa410a54c32b4 Mon Sep 17 00:00:00 2001 From: Carlosokumu Date: Fri, 20 Sep 2024 14:39:52 +0300 Subject: [PATCH] add supported language codes --- internal/utils/isocodes.go | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 internal/utils/isocodes.go diff --git a/internal/utils/isocodes.go b/internal/utils/isocodes.go new file mode 100644 index 0000000..3bdfbeb --- /dev/null +++ b/internal/utils/isocodes.go @@ -0,0 +1,11 @@ +package utils + +var isoCodes = map[string]bool{ + "eng": true, // English + "swa": true, // Swahili + +} + +func IsValidISO639(code string) bool { + return isoCodes[code] +}