Documentation
¶
Overview ¶
Package i18n provide i18n (Internationalization) support
Index ¶
Constants ¶
View Source
const ( // CookieValueZH ... CookieValueZH = "zh-cn" // CookieValueEN ... CookieValueEN = "en-us" )
View Source
const Placeholder = "<TODO>"
Placeholder 翻译文件中的占位符
Variables ¶
This section is empty.
Functions ¶
func GetLangCookieValue ¶
GetLangCookieValue 获取语言版本 Cookie 值
func TranslateWithLang ¶
TranslateWithLang 获取国际化文本
Types ¶
type Lang ¶
type Lang string
Lang 语言
func GetLangFromContext ¶
GetLangFromContext 从 Context 中获取语言版本
func GetLangFromCookie ¶
GetLangFromCookie 从 Cookie 中获取语言版本
Click to show internal directories.
Click to hide internal directories.