-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add localization support for the jte-spring-boot-starter-3 #418
Comments
I was doing some more testing on my plugin and there still seems to be an issue to resolve. It is currently always localizing to the messages in messages.properties and not to the correct locale. I will report back if I solved the issue. |
It seems the @RequestScoped @bean I created in my library only works if defined in the application itself and not the library. Unfortunately, the library now requires 3 @beans to be defined in code instead of the flag in application.properties. |
I had an idea overnight and i was able to fix the issue in the 1.0.0 release in a better way. |
Thank you for sharing @Gadnex. I would suggest to give the plugin some time and usage and once all rough edges have been polished I can totally see this in the starter! |
@casid @Gadnex Great work, I was already thinking how to integrate it into the starter, such that it is easy to use. Using the interceptor looks good. We need to think of the reactive equivalent (I think web filters?) so it work out of box with both reactive web and webmvc. Same for the localeContextHolder, which is not available in reactive environments. |
@atomfrede thanks for the feedback. |
No worries I can give it a try. I guess reactive is not used that much and will maybe decrease with the rise of virtual threads. |
I have created a plugin for injecting an instance of gg.jte.support.LocalizationSupport into all Spring Boot ModelAndViews.
Details of my plugin can be found here:
https://github.com/Gadnex/jte-localizer-spring-boot-starter
The plugin is enabled by setting the Spring Boot application.properties value:
gg.jte.localizer.inject=true
I was hoping that the code for this plugin could be incorporated into jte-spring-boot-starter-3 and perhaps jte-spring-boot-starter-2, but not into the JTE core itself.
If there is interest in this, what can I do to help?
The text was updated successfully, but these errors were encountered: