feat(i18n): add internationalization framework with 10 languages
- Create i18n utility module (app/utils/i18n.py) with translation loading, browser language detection, AI fallback, and l10n helpers - Add JSON translation files for EN, DE, FR, ES, IT, PT, NL, PL, ZH, RU - Add preferred_language column to UserProfile model with migration - Register _() translation function as Jinja2 global - Update base.html with translated navigation, footer, cookie notice - Add language selector dropdown in nav bar (desktop + mobile) - Create API endpoints for language preference (POST/GET /api/i18n/) - Support language detection: user profile > cookie > Accept-Language > default Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -256,6 +256,10 @@ class UserProfile(Base):
|
||||
preferred_destination = Column(String(50), nullable=True)
|
||||
stripe_customer_id = Column(String(64), nullable=True)
|
||||
|
||||
# UI language preference for i18n (ISO 639-1 code, e.g. "en", "de", "fr")
|
||||
# NULL means "auto-detect from browser Accept-Language header"
|
||||
preferred_language = Column(String(10), nullable=True)
|
||||
|
||||
created_at = Column(DateTime(timezone=True), server_default=func.now())
|
||||
updated_at = Column(DateTime(timezone=True), server_default=func.now(), onupdate=func.now())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user