<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic freemarker inclusions in properties files in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/freemarker-inclusions-in-properties-files/m-p/273089#M226219</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm currently working on a project involving several home-made webscripts.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I internationalize those by using the classic&amp;nbsp; .&amp;lt;method&amp;gt;.properties files.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I noticed that, obviously, some of my language strings were the same across all those webscript so I tried to include them in a 'global.properties' file and tried to include it on each webscript.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So I tried a classic freemarker &amp;lt;#include "../myPath/global.properties" /&amp;gt; in my&amp;nbsp; .&amp;lt;method&amp;gt;.properties&amp;nbsp;&amp;nbsp; however the strings aren't available.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Since I double checked the path was fine before posting, I suppose that freemarker doesn't parse the properties files.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I currently have 2 options:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; - appending my shared strings to &amp;lt;TOMCAT HOME&amp;gt;/webapps/alfresco/WEB-INF/classes/alfresco/messages/templates-messages.properties&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; - copy/pasting my shared strings in each of my properties files&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And as you can guess, none of those satisfy me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there something I'm missing? Some kind of workaround?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Mar 2012 11:40:09 GMT</pubDate>
    <dc:creator>scouil</dc:creator>
    <dc:date>2012-03-08T11:40:09Z</dc:date>
    <item>
      <title>freemarker inclusions in properties files</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/freemarker-inclusions-in-properties-files/m-p/273089#M226219</link>
      <description>Hello,I'm currently working on a project involving several home-made webscripts.I internationalize those by using the classic&amp;nbsp; .&amp;lt;method&amp;gt;.properties files.I noticed that, obviously, some of my language strings were the same across all those webscript so I tried to include them in a 'global.prop</description>
      <pubDate>Thu, 08 Mar 2012 11:40:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/freemarker-inclusions-in-properties-files/m-p/273089#M226219</guid>
      <dc:creator>scouil</dc:creator>
      <dc:date>2012-03-08T11:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: freemarker inclusions in properties files</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/freemarker-inclusions-in-properties-files/m-p/273090#M226220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;property files are handled according to the Java standard defined for them - no FreeMarker processing is going on here.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When you want to be able to use fragments as globally defined, reusable I18n, you should use the ResourceBundleBootstrapComponent of Spring Surf / Alfresco, and include it in one of your Spring bean configuration files (e.g. custom-application-context.xml). The following wiki page is a bit out-of-date for the more recent Alfresco versions, but still relevant: &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/I18N#Registering_a_resource_bundle" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/I18N#Registering_a_resource_bundle&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Axel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2012 12:38:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/freemarker-inclusions-in-properties-files/m-p/273090#M226220</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2012-03-16T12:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: freemarker inclusions in properties files</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/freemarker-inclusions-in-properties-files/m-p/273091#M226221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for answering.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was hoping for a solution where the file is uploaded to alfresco since I find it easier to modify/redeploy this way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But your solution is the cleanest I have for now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll leave the post open for a week hoping for some other solution. I'll mark it as solved after that if I get no answer to give you your deserved point &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2012 13:29:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/freemarker-inclusions-in-properties-files/m-p/273091#M226221</guid>
      <dc:creator>scouil</dc:creator>
      <dc:date>2012-03-19T13:29:04Z</dc:date>
    </item>
  </channel>
</rss>

