Documentation
¶
Index ¶
- Constants
- Variables
- func GetLocales() []string
- func Run()
- type LangSelector
- func (lang *LangSelector) AddLocale(locale string) *dbus.Error
- func (lang *LangSelector) DeleteLocale(locale string) *dbus.Error
- func (v *LangSelector) GetExportedMethods() dbusutil.ExportedMethods
- func (*LangSelector) GetInterfaceName() string
- func (lang *LangSelector) GetLanguageSupportPackages(locale string) (packages []string, busErr *dbus.Error)
- func (lang *LangSelector) GetLocaleDescription(locale string) (description string, busErr *dbus.Error)
- func (lang *LangSelector) GetLocaleList() (locales []LocaleInfo, busErr *dbus.Error)
- func (lang *LangSelector) Reset() *dbus.Error
- func (lang *LangSelector) SetLocale(locale string) *dbus.Error
- type LocaleInfo
- type LocaleInfos
Constants ¶
View Source
const ( // Locale changed state: has been done // // Locale 更改状态:已经修改完成 LocaleStateChanged = 0 // Locale changed state: changing // // Locale 更改状态:正在修改中 LocaleStateChanging = 1 )
Variables ¶
View Source
var ( // Error: not found the file // // 错误:没有此文件 ErrFileNotExist = fmt.Errorf("File not exist") // Error: not found the locale // // 错误:无效的 Locale ErrLocaleNotFound = fmt.Errorf("Locale not found") // Error: changing locale failure // // 错误:修改 locale 失败 ErrLocaleChangeFailed = fmt.Errorf("Changing locale failed") )
Functions ¶
func GetLocales ¶
func GetLocales() []string
Types ¶
type LangSelector ¶
type LangSelector struct { PropsMu sync.RWMutex // The current locale CurrentLocale string // Store locale changed state LocaleState int32 // dbusutil-gen: equal=nil Locales []string // contains filtered or unexported fields }
func (*LangSelector) DeleteLocale ¶
func (lang *LangSelector) DeleteLocale(locale string) *dbus.Error
func (*LangSelector) GetExportedMethods ¶
func (v *LangSelector) GetExportedMethods() dbusutil.ExportedMethods
func (*LangSelector) GetInterfaceName ¶
func (*LangSelector) GetInterfaceName() string
func (*LangSelector) GetLanguageSupportPackages ¶
func (lang *LangSelector) GetLanguageSupportPackages(locale string) (packages []string, busErr *dbus.Error)
func (*LangSelector) GetLocaleDescription ¶
func (lang *LangSelector) GetLocaleDescription(locale string) (description string, busErr *dbus.Error)
func (*LangSelector) GetLocaleList ¶
func (lang *LangSelector) GetLocaleList() (locales []LocaleInfo, busErr *dbus.Error)
Get locale info list that deepin supported
得到系统支持的 locale 信息列表
func (*LangSelector) Reset ¶
func (lang *LangSelector) Reset() *dbus.Error
Reset set user desktop environment locale to system default locale
type LocaleInfo ¶
type LocaleInfos ¶
type LocaleInfos []LocaleInfo
func (LocaleInfos) Get ¶
func (infos LocaleInfos) Get(locale string) (LocaleInfo, error)
Click to show internal directories.
Click to hide internal directories.