Package com.vaadin.flow.i18n
Class DefaultTranslationsHotswapper
java.lang.Object
com.vaadin.flow.i18n.DefaultTranslationsHotswapper
- All Implemented Interfaces:
VaadinHotswapper
Handles the automatic hotswapping of translation resources in a Vaadin-based
application. This class listens for changes in application resources and
takes appropriate actions to update related translations dynamically.
When a resource file matching the path pattern for translation properties
(e.g., `vaadin-i18n/*.properties`) is changed, this class performs two main
actions: 1. Clears the ResourceBundle cache to ensure the latest
translations are loaded. 2. Notifies the client about the translation updates
by triggering an appropriate update event and UI refreshes.
For internal use only. May be renamed or removed in a future release.
- Since:
- 25.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled by Vaadin hotswap entry point when one or more application resources have been updated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.hotswap.VaadinHotswapper
onClassesChange, onClassesChange, onClassLoadEvent, onClassLoadEvent, onHotswapComplete, onInit
-
Constructor Details
-
DefaultTranslationsHotswapper
public DefaultTranslationsHotswapper()
-
-
Method Details
-
onResourcesChange
Description copied from interface:VaadinHotswapperCalled by Vaadin hotswap entry point when one or more application resources have been updated.This method is meant to perform application-wide updates, involving all active UI instances.
- Specified by:
onResourcesChangein interfaceVaadinHotswapper- Parameters:
event- the event instance carrying the information about the changed resources.
-