resourcebundle

Database-driven resource bundle in Spring

依然范特西╮ 提交于 2019-12-18 04:54:18
问题 I have problem to make "database-driven resource bundle" work. In example below TextDAO is properly injected during application start, but when messageSource is accessed, a new Messages object is created - that's the point. How to make this work ? <!-- message source --> <bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource"> <property name="basename" value="someapp.bundle.Messages" /> </bean> Messages.java @Component public class Messages

Is it possible to include resource bundle files within a resource bundle

有些话、适合烂在心里 提交于 2019-12-17 18:42:03
问题 We are using java.util.ResourceBundle to load property information. Our property file has grown so huge and we are thinking of splitting the master property file into several sub modules. Is it possible to achieve this? master.properties ==> master.properties include moduleA.properties include moduleB.properties Let me know? 回答1: First of all, I wonder why you've chosen java.util.ResourceBundle over java.util.Properties. Given how your question is formulated, you don't seem to care about

Getting localized message from resourceBundle via annotations in Spring Framework

送分小仙女□ 提交于 2019-12-17 17:38:26
问题 Is it possible to do this ? Currently it is done like this : <bean id="resource" class="org.springframework.context.support.ResourceBundleMessageSource"> <property name="basenames"> <list> <value>content.Language</value> </list> </property> </bean> @Autowired protected MessageSource resource; protected String getMessage(String code, Object[] object, Locale locale) { return resource.getMessage(code, object, locale); } Is there a way for it to be like getting properties via @Value annotation ?

How to use xPages translation files from Lotusscript and SSJS libraries

情到浓时终转凉″ 提交于 2019-12-14 04:07:23
问题 I am using resource bundles to translate all my xpages into different languages. this works great for translating labels etc in xPages. I do however have Lotusscript agents and server side javascript code in the database that send mail to users and I want these emails to also be translated using the translation files. so my question is simple. is it possible to read the translation files from SSJS scriptlibraries and Lotusscript agents. If so please let me know how? Image below show all my

How to check if a Java ResourceBundle is loadable, without loading it?

与世无争的帅哥 提交于 2019-12-12 10:56:44
问题 I would like to check the existence of a ResourceBundle without actually loading it. Typically, I'm using Guice, and at initialization time, I want to check the existence, while at execution time, I want to load it. If the bundle doesn't exist, I want an early report of the inexistence of the RB. If it was possible to get the ResourceBundle.Control instance used for a specific ResourceBundle, I would have no problem getting the basic information to build the actual resource name (using

Delete file from bundle after install

℡╲_俬逩灬. 提交于 2019-12-12 10:48:01
问题 I realize that you can't delete an item from the iOS bundle since it's signed, but is there a way to include a file and have it not be part of the "signed" bundle, but still present on install? Use case is basically install the app, read the contents of the file, store in the keychain, then delete the file. Thanks for any help and guidance. Of note -> The app can't access the internet to fetch this file. And being able to delete the file (or wipe the file's contents) after reading it once is

How to translate one language to another using java programming [closed]

邮差的信 提交于 2019-12-12 09:46:45
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 6 months ago . in my project, there is a content section. where user can view contents in four diff languages. Is there any way, that i put contents in one language, and according to user's choice my java program translate it to the selected language and now user can view it to that selected

In Java, how to reload dynamically resources bundles in a web application?

我与影子孤独终老i 提交于 2019-12-12 08:36:47
问题 We are using fmt:setBundle to load a resource bundle from a database (we extended the ResourceBundle class to do that). When we modify a value in database, we have to reload the web server to display the new value on the web app. Is there any simple way to use the new value without restarting the web server ? (We do not want to always look up the value from database but we would like to invalidate the cache, for example by calling a special 'admin' URL) EDIT : We are using JDK 1.4, so I would

How to put JSF message bundle outside of WAR so it can be edited without redeployment?

纵然是瞬间 提交于 2019-12-12 07:26:55
问题 We have a JSF application on WildFly 8 which uses the traditionally mechanism with internationalizing text by having message bundles for German and English in the WEB-INF\classes folder of the WAR and a configuration in faces-config.xml mapping a name to it and listing the locales. The application does not have a database connection, but uses REST services to communicate with a 2nd application. Now we need to be able to change text more easily, meaning not having to build a new WAR file and

Placeholder in resource bundles

喜你入骨 提交于 2019-12-12 05:38:22
问题 I need some placeholders with automatic filling in my resource bundle. An user of my application has two possible configuration, for example "1" and "2". Depending on this configuration, an entry should returned with the correct value. I know, that conditions are possible: currentConfig=The configuration is currently the {0,choice,0#first|1#second} In my faces-config.xml the resource bundle is configured for access in JSF. Now, I want to get this value in JSF without specifying parameters: <h