{{ range _, language := Torrent.Languages}}
{{ if language != "" }}
- {{ LanguageName(language, T) }}
+ {{ LanguageName(language, T) }}
{{end}}
{{end}}
diff --git a/templates/site/user/torrents.jet.html b/templates/site/user/torrents.jet.html
index 8b78c034..fc7fee68 100644
--- a/templates/site/user/torrents.jet.html
+++ b/templates/site/user/torrents.jet.html
@@ -26,7 +26,7 @@
{{ if torrent.Languages[0] != "" }}
1 && (key+1) < len(torrent.Languages) }},{{ end }}{{ end }}">
-
+
{{end}}
diff --git a/utils/publicSettings/publicSettings.go b/utils/publicSettings/publicSettings.go
index 31fd3705..a04125ab 100644
--- a/utils/publicSettings/publicSettings.go
+++ b/utils/publicSettings/publicSettings.go
@@ -227,8 +227,13 @@ func (langs Languages) Exist(name string) bool {
// Translate accepts a languageCode in string and translate the language to the language from the language code
func (lang *Language) Translate(languageCode template.HTML) string {
- langTranslate := display.Tags(getParentTag(string(languageCode)))
- return langTranslate.Name(lang)
+ return Translate(lang.Tag, string(languageCode))
+}
+
+// Translate accepts a languageCode in string and translate the language to the language from the language code in to
+func Translate(languageCode string, to string) string {
+ langTranslate := display.Tags(getParentTag(to))
+ return langTranslate.Name(languageCode)
}
// Flag reads the language's country code and return the country's flag if national true or the international flag for the language
diff --git a/utils/torrentLanguages/torrent_languages.go b/utils/torrentLanguages/torrent_languages.go
index 48e4bcfc..96b2dae1 100644
--- a/utils/torrentLanguages/torrent_languages.go
+++ b/utils/torrentLanguages/torrent_languages.go
@@ -25,6 +25,7 @@ func initTorrentLanguages() {
last := len(torrentLanguages) - 1
if last > 0 && !strings.Contains(torrentLanguages[last].Name, lang.Name) {
torrentLanguages[last].Name += ", " + lang.Name
+ torrentLanguages[last].Tag += ", " + lang.Tag
}
} else {
prevLang = lang.Code