Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/go-i18n.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/v2
diff options
context:
space:
mode:
authorTaras <Trane9991@gmail.com>2018-08-09 17:24:56 +0300
committerNick Snyder <nickdsnyder@gmail.com>2018-08-09 17:24:56 +0300
commite786c8873251b8b165cdf369021c13b97a43d7d9 (patch)
treeed35967e55e05443652ccf77fc1e84baeeb452b6 /v2
parenta16b91a3ba80db3a2301c70d1d302d42251c9079 (diff)
add func to list Language tags from bundle (#120)
Diffstat (limited to 'v2')
-rw-r--r--v2/i18n/bundle.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/v2/i18n/bundle.go b/v2/i18n/bundle.go
index 2a8faaf..05804ed 100644
--- a/v2/i18n/bundle.go
+++ b/v2/i18n/bundle.go
@@ -127,3 +127,9 @@ func (b *Bundle) addTag(tag language.Tag) {
b.tags = append(b.tags, tag)
b.matcher = language.NewMatcher(b.tags)
}
+
+// LanguageTags returns the list of language tags
+// of all the translations loaded into the bundle
+func (b *Bundle) LanguageTags() []language.Tag {
+ return b.tags
+}