<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Use resources in helper]]></title><description><![CDATA[<p>Hello I would like to translate with the resource system directly in a helper. In a function of a helper I make a return of an html code and I would like to translate according to the language pass in parameter via Api. Can you please show me an example that allows this kind of translation.<br />
cordially</p>
]]></description><link>https://forum.jsreport.net/topic/1405/use-resources-in-helper</link><generator>RSS for Node</generator><lastBuildDate>Tue, 19 May 2026 03:28:59 GMT</lastBuildDate><atom:link href="https://forum.jsreport.net/topic/1405.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 07 Jan 2020 10:06:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Use resources in helper on Invalid Date]]></title><description><![CDATA[<p>Hello I would like to translate with the resource system directly in a helper. In a function of a helper I make a return of an html code and I would like to translate according to the language pass in parameter via Api. Can you please show me an example that allows this kind of translation.<br />
cordially</p>
]]></description><link>https://forum.jsreport.net/post/6462</link><guid isPermaLink="true">https://forum.jsreport.net/post/6462</guid><dc:creator><![CDATA[fafax]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Use resources in helper on Invalid Date]]></title><description><![CDATA[<p>Please try something like this if you use handlebars</p>
<pre><code>{{{helperA}}}
</code></pre>
<pre><code>function helperA() {
    return this.$localizedResource.message
}
</code></pre>
<p>The <code>$localizedResource</code> is a normal property available on the root data.</p>
]]></description><link>https://forum.jsreport.net/post/6464</link><guid isPermaLink="true">https://forum.jsreport.net/post/6464</guid><dc:creator><![CDATA[jan_blaha]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Use resources in helper on Invalid Date]]></title><description><![CDATA[<p>thank you for your response that help me well but I have another difficulty because I use the helper function inside a loop so this does not correspond and at resource level I have undefined how if you please i can fix this concern</p>
]]></description><link>https://forum.jsreport.net/post/6476</link><guid isPermaLink="true">https://forum.jsreport.net/post/6476</guid><dc:creator><![CDATA[fafax]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Use resources in helper on Invalid Date]]></title><description><![CDATA[<p>the <code>$localizedResource</code> is just another prop on the templating engine root context.<br />
When you are inside a loop, you can reach it this way</p>
<pre><code>{{@root.$localizedResource.title}} 
</code></pre>
<p>And just pass it as an argument to your helper call.</p>
]]></description><link>https://forum.jsreport.net/post/6480</link><guid isPermaLink="true">https://forum.jsreport.net/post/6480</guid><dc:creator><![CDATA[jan_blaha]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>