java - How to get a string from .properties file and use it in the same .properties file -


is there way retrieve value of var in .properties file , use inside same .properties file?

insted of (where have write manually words 'main menu' in every line)

mainmenutitle = main menu notblank.menu.title = field 'main menu' can't null size.menu.title = field 'main menu' must contains 10 characters 

i want (where automatically value of var 'mainmenutitle')

mainmenutitle = main menu      notblank.menu.title = field **mainmenutitle** can't null size.menu.title = field **mainmenutitle** must contains 10 characters 

you can both message separately , make replace inject title

   @inject   public messagesource messagesource;   public static string getmessage(string messagekey1, string messagekey12) {     string title =  messagesource.getmessage(messagekey1, arguments, locale);     string message =  messagesource.getmessage(messagekey2, arguments, locale).replace("**mainmenutitle**", title);  } 

Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -