{"id":4916,"date":"2014-03-30T16:55:42","date_gmt":"2014-03-30T16:55:42","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/how-to-deal-with-presence-of-variables-in-message-bundles-localization-collection-of-common-programming-errors\/"},"modified":"2014-03-30T16:55:42","modified_gmt":"2014-03-30T16:55:42","slug":"how-to-deal-with-presence-of-variables-in-message-bundles-localization-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/how-to-deal-with-presence-of-variables-in-message-bundles-localization-collection-of-common-programming-errors\/","title":{"rendered":"How to deal with presence of variables in message bundles ( localization )-Collection of common programming errors"},"content":{"rendered":"<p>One methodology could be to replace variables with markers and use the String.Format method ( http:\/\/download.oracle.com\/javase\/1.5.0\/docs\/api\/java\/lang\/String.html#format(java.lang.String,%20java.lang.Object&#8230;) ) or another kind of Formatter to replace accordingly.<\/p>\n<p>Whilst I&#8217;m just getting into Spring myself and suspect that it could provide a more elegant solution, currently I would use string formatters to replace placeholders with variable values at runtime.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One methodology could be to replace variables with markers and use the String.Format method ( http:\/\/download.oracle.com\/javase\/1.5.0\/docs\/api\/java\/lang\/String.html#format(java.lang.String,%20java.lang.Object&#8230;) ) or another kind of Formatter to replace accordingly. Whilst I&#8217;m just getting into Spring myself and suspect that it could provide a more elegant solution, currently I would use string formatters to replace placeholders with variable values at [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4916","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4916","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4916"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4916\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4916"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4916"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}