feat(pages): add multi-language support for landing pages
Implement internationalization system for landing pages: - Database model for storing language-specific translations - Language configuration with default and enabled languages - Language switcher in navigation across all templates - Translation management UI in settings - Support for 15 languages including English, Spanish, German, French, Japanese, Chinese - Auto-detection and manual language selection - AI-powered translation generation capability
This commit is contained in:
@@ -67,6 +67,9 @@ type LandingConfig struct {
|
||||
|
||||
// A/B testing experiments
|
||||
Experiments ExperimentConfig `yaml:"experiments,omitempty"`
|
||||
|
||||
// Multi-language support
|
||||
I18n I18nConfig `yaml:"i18n,omitempty"`
|
||||
}
|
||||
|
||||
// BrandConfig represents brand/identity settings
|
||||
@@ -233,6 +236,33 @@ type ExperimentConfig struct {
|
||||
ApprovalRequired bool `yaml:"approval_required,omitempty"`
|
||||
}
|
||||
|
||||
// I18nConfig represents multi-language settings for the landing page
|
||||
type I18nConfig struct {
|
||||
DefaultLang string `yaml:"default_lang,omitempty" json:"default_lang,omitempty"`
|
||||
Languages []string `yaml:"languages,omitempty" json:"languages,omitempty"`
|
||||
}
|
||||
|
||||
// LanguageDisplayNames returns a map of language codes to display names
|
||||
func LanguageDisplayNames() map[string]string {
|
||||
return map[string]string{
|
||||
"en": "English",
|
||||
"es": "Espanol",
|
||||
"de": "Deutsch",
|
||||
"fr": "Francais",
|
||||
"ja": "Japanese",
|
||||
"zh": "Chinese",
|
||||
"pt": "Portugues",
|
||||
"ru": "Russian",
|
||||
"ko": "Korean",
|
||||
"it": "Italiano",
|
||||
"hi": "Hindi",
|
||||
"ar": "Arabic",
|
||||
"nl": "Nederlands",
|
||||
"pl": "Polski",
|
||||
"tr": "Turkish",
|
||||
}
|
||||
}
|
||||
|
||||
// AdvancedConfig represents advanced settings
|
||||
type AdvancedConfig struct {
|
||||
CustomCSS string `yaml:"custom_css,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user