15 lines
499 B
HTML
15 lines
499 B
HTML
{{ $languageCode:= .Lang }}
|
|
{{/* by default the language code and the country code are same */}}
|
|
{{ $countryCode:= $languageCode }}
|
|
|
|
{{/* language code and country code are not same for some countries. we need to fix them. */}}
|
|
{{ if eq $languageCode "en" }}
|
|
{{ $countryCode = "gb" }}
|
|
{{ else if eq $languageCode "bn" }}
|
|
{{ $countryCode = "bd" }}
|
|
{{ else if eq $languageCode "hi" }}
|
|
{{ $countryCode = "in" }}
|
|
{{ end }}
|
|
|
|
{{/* return the country code */}}
|
|
{{ return $countryCode }}
|