Documentation
¶
Index ¶
- Constants
- func AddSuffixToFileName(path, suffix string) string
- func StringifyProperties(p *properties.Properties) string
- func TranslatePropertiesFile(props *properties.Properties, translator Translator, lang, target string) (*properties.Properties, error)
- type AliCloudTranslator
- type Translator
- type TranslatorType
Constants ¶
View Source
const ( // ALICLOUD Translator ALICLOUD = TranslatorType("ALICLOUD") )
Variables ¶
This section is empty.
Functions ¶
func AddSuffixToFileName ¶
AddSuffixToFileName string
func StringifyProperties ¶
func StringifyProperties(p *properties.Properties) string
StringifyProperties with comments
func TranslatePropertiesFile ¶
func TranslatePropertiesFile(props *properties.Properties, translator Translator, lang, target string) (*properties.Properties, error)
TranslatePropertiesFile process
Types ¶
type AliCloudTranslator ¶
type AliCloudTranslator struct {
// contains filtered or unexported fields
}
AliCloudTranslator service
func NewAliCloudTranslator ¶
func NewAliCloudTranslator(region, keyID, keySecret string) (*AliCloudTranslator, error)
NewAliCloudTranslator instance
func (*AliCloudTranslator) GetTranslation ¶
GetTranslation text
type Translator ¶
Translator interface
func NewTranslator ¶
func NewTranslator(provider TranslatorType, props map[string]string) (Translator, error)
NewTranslator instance
Click to show internal directories.
Click to hide internal directories.