Documentation ¶
Index ¶
- type CountryHelper
- func (instance *CountryHelper) CountryCode(langTag string) string
- func (instance *CountryHelper) CountryName(langTag string) string
- func (instance *CountryHelper) CountryNameOf(langTag, outTag string) string
- func (instance *CountryHelper) CurrencyName(langTag string) string
- func (instance *CountryHelper) CurrencySymbol(langTag string) string
- func (instance *CountryHelper) FormatCurrency(langTag string, value float64) string
- func (instance *CountryHelper) FormatDate(langTag string, date time.Time) string
- func (instance *CountryHelper) FormatTime(langTag string, date time.Time) string
- func (instance *CountryHelper) FormatTimeHM(langTag string, date time.Time) string
- func (instance *CountryHelper) Lang(code string) string
- func (instance *CountryHelper) LangName(lang string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CountryHelper ¶
type CountryHelper struct {
DefLang string
}
var Country *CountryHelper
func (*CountryHelper) CountryCode ¶ added in v0.2.110
func (instance *CountryHelper) CountryCode(langTag string) string
func (*CountryHelper) CountryName ¶
func (instance *CountryHelper) CountryName(langTag string) string
func (*CountryHelper) CountryNameOf ¶ added in v0.2.110
func (instance *CountryHelper) CountryNameOf(langTag, outTag string) string
func (*CountryHelper) CurrencyName ¶
func (instance *CountryHelper) CurrencyName(langTag string) string
func (*CountryHelper) CurrencySymbol ¶
func (instance *CountryHelper) CurrencySymbol(langTag string) string
func (*CountryHelper) FormatCurrency ¶
func (instance *CountryHelper) FormatCurrency(langTag string, value float64) string
func (*CountryHelper) FormatDate ¶
func (instance *CountryHelper) FormatDate(langTag string, date time.Time) string
func (*CountryHelper) FormatTime ¶
func (instance *CountryHelper) FormatTime(langTag string, date time.Time) string
func (*CountryHelper) FormatTimeHM ¶
func (instance *CountryHelper) FormatTimeHM(langTag string, date time.Time) string
func (*CountryHelper) Lang ¶
func (instance *CountryHelper) Lang(code string) string
Lang extracts the ISO 639-1 language code (e.g., "en", "it") from the provided language or locale code string.
func (*CountryHelper) LangName ¶
func (instance *CountryHelper) LangName(lang string) string
LangName return ISO language name (i.e. "Italian") from a lang code like "it"
Click to show internal directories.
Click to hide internal directories.