{"id":194,"date":"2008-03-24T17:34:58","date_gmt":"2008-03-25T01:34:58","guid":{"rendered":"http:\/\/www.ericfeminella.com\/blog\/2008\/03\/24\/quick-tip-multiline-values-in-properties-files\/"},"modified":"2012-03-04T23:32:11","modified_gmt":"2012-03-05T04:32:11","slug":"quick-tip-multiline-values-in-properties-files","status":"publish","type":"post","link":"https:\/\/www.ericfeminella.com\/blog\/2008\/03\/24\/quick-tip-multiline-values-in-properties-files\/","title":{"rendered":"Using multiline values in properties files"},"content":{"rendered":"<p>When building <a href=\"http:\/\/livedocs.adobe.com\/flex\/3\/html\/help.html?content=l10n_2.html\" target=\"_blank\">localized Flex applications<\/a> with <a href=\"http:\/\/livedocs.adobe.com\/flex\/3\/html\/index.html\" target=\"_blank\">ResourceBundle<\/a> there are a few tricks you may not be aware of which can come in handy should you need them. <\/p>\n<p>I have had quite a few people ask how multiline values can be specified in a properties file. This is a pretty common question and luckily the answer is very simple: backslash  <strong>(\\)<\/strong>. <\/p>\n<p>For example, suppose you have a properties file which contains a string resource with a really long value, like a paragraph. Typically the property value will just be one really long String on one line. However you can use the backslash (\\) character to continue the value on multiple lines in order to make the properties file more legible, such as in the following example:<\/p>\n<pre lang=\"c\">\r\ntitle   = Welcome\r\nmessage = Lorem ipsum dolor sit amet, consectetur elit, \\\r\nsed do eiusmod tempor incididunt ut labore et dolore magna \\\r\naliqua. Ut enim ad minim veniam, quis nostrud exercitation \\\r\nullamco laboris nisi ut aliquip ex ea commodo consequat. \\\r\nDuis aute irure dolor in reprehenderit in voluptate velit \\\r\nesse cillum dolore eu fugiat nulla pariatur. Excepteur sint\\\r\noccaecat cupidatat non proident, sunt in culpa qui officia \\\r\ndeserunt mollit anim id est laborum.\r\n<\/pre>\n<p>So if you have properties with very long values remember to use backslash (\\) to help clean up your resources. <\/p>\n<p><a href=\"http:\/\/code.ericfeminella.com\/examples\/multiline-resources\/MultilineResources.html\" target=\"_blank\">example<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When building localized Flex applications with ResourceBundle there are a few tricks you may not be aware of which can come in handy should you need them. I have had quite a few people ask how multiline values can be specified in a properties file. This is a pretty common question and luckily the answer is very simple: backslash (\\)&#8230;. <a class=\"read-more\" href=\"https:\/\/www.ericfeminella.com\/blog\/2008\/03\/24\/quick-tip-multiline-values-in-properties-files\/\">Continue Reading<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[9],"tags":[],"class_list":["post-194","post","type-post","status-publish","format-standard","hentry","category-news"],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/posts\/194","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/comments?post=194"}],"version-history":[{"count":0,"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/posts\/194\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/media?parent=194"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/categories?post=194"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/tags?post=194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}