internationalization - Override i18n .properties file during runtime in Grails -


I'm trying to override the main message. For my current work during the properties file runtime, I need the application package based on the product brand. For example, if I give a logical argument like "grails dev run-app-dbrand = a" Based on the .properties file should be able to change the message.

Another requirement is that I need a master. Properties file that contains all the messages and I want to create a separate folder to store messages based on brand. For example, my master The properties file will include A, B, C, D and My brand. The properties file will be a subset of the master of the master, which will only be A (message message strings for A in the master will surely be different from the message string in. The properties file is presented under the brand folder) For example, the properties file for the master In the Aphrodecton name may be "hello" and .properties file in the .properties file can be "world".

When I run-app with a brand = a logic, I should be able to load the extrude name from the .properties file in the brand folder without disturbing the current brand status. Properties file (This is because the changes appear in the guit).

I noticed some methods and I got the only good solution that I needed to get the message from DB, which I did not want to do. I want a way to override some grails using the configuration or event listener.

I'm assuming that there should be a way to override the message memory in grails on time.

Hope, I asked in detail with my question.

Please help, I'm really new to grails.

I think how you should handle it. This applies

  org.springframework.context.support.AbstractMessageSource   

This looks at the original message source with properties, if it is not in the database Table It seems as if you want to store the same functionality.

The Grails itself uses

  org.codehaus.groovy.grails.context.support.ReloadableResourceBundleMessageSource   

or < / P>

  org.codehaus.groovy.grails.context.support.PluginAwareResourceBundleMessageSource   

I have not seen in them the application is injected into artifacts.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -