Add CSS animations for rotating stars in MainPageLayout: Implemented new animations for star graphics to enhance visual appeal. Updated SharedCarousel to support dynamic language changes and improved category fetching logic. Enhanced localization files with new text for indoor season prompts in multiple languages.

This commit is contained in:
sebseb7
2025-07-18 15:26:11 +02:00
parent 93887ce397
commit 04e97c2522
25 changed files with 233 additions and 37 deletions

View File

@@ -28,14 +28,15 @@ export class LanguageProvider extends Component {
}
componentDidMount() {
// Listen for language changes from i18n
if (this.props.i18n) {
this.props.i18n.on('languageChanged', this.handleLanguageChanged);
// Set initial language state and HTML attribute
this.setState({ currentLanguage: this.props.i18n.language });
document.documentElement.lang = this.props.i18n.language;
}
}
componentWillUnmount() {
// Clean up listener
if (this.props.i18n) {
this.props.i18n.off('languageChanged', this.handleLanguageChanged);
}
@@ -47,6 +48,13 @@ export class LanguageProvider extends Component {
// Update HTML lang attribute for SEO
document.documentElement.lang = lng;
// Ensure language is saved to localStorage
try {
localStorage.setItem('i18nextLng', lng);
} catch (error) {
console.warn('Could not save language to localStorage:', error);
}
// Update config if available
if (window.shopConfig) {
// Language code mapping for all supported languages