<?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 Best way to localize addons? in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Best-way-to-localize-addons/m-p/663962#M10411</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was always thinking if there's a better way to do this.. I have 2 versions of my addon, international and german. I have the two .grc files:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Resources\RINT\addon_int.grc&lt;/P&gt;&lt;P&gt;Resources\RGER\addon_ger.grc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You cannot set up preprocessor definitions in .grc files neither in your Resources\RFIX-win\AddOn_Main.rc2 file, it simply doesn't work. However the here included ("#include "addon_int.grc.rc2") file will be later built in your addon. So you have to open this&amp;nbsp;AddOn_Main.rc2 every time and comment out/set up your desired .grc.rc2 file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it has to be look like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#include "addon_int.grc.rc2"
//#include "addon_ger.grc.rc2"

#include "addon_fix.grc.rc2"&lt;/LI-CODE&gt;&lt;P&gt;If you include both, your resources will conflict each other.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Manually change lines in your "addon.vcxproj" where your resources will compile help you neither.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
    <pubDate>Wed, 28 May 2025 13:16:48 GMT</pubDate>
    <dc:creator>Carrast</dc:creator>
    <dc:date>2025-05-28T13:16:48Z</dc:date>
    <item>
      <title>Best way to localize addons?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Best-way-to-localize-addons/m-p/663962#M10411</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was always thinking if there's a better way to do this.. I have 2 versions of my addon, international and german. I have the two .grc files:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Resources\RINT\addon_int.grc&lt;/P&gt;&lt;P&gt;Resources\RGER\addon_ger.grc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You cannot set up preprocessor definitions in .grc files neither in your Resources\RFIX-win\AddOn_Main.rc2 file, it simply doesn't work. However the here included ("#include "addon_int.grc.rc2") file will be later built in your addon. So you have to open this&amp;nbsp;AddOn_Main.rc2 every time and comment out/set up your desired .grc.rc2 file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it has to be look like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#include "addon_int.grc.rc2"
//#include "addon_ger.grc.rc2"

#include "addon_fix.grc.rc2"&lt;/LI-CODE&gt;&lt;P&gt;If you include both, your resources will conflict each other.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Manually change lines in your "addon.vcxproj" where your resources will compile help you neither.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Wed, 28 May 2025 13:16:48 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Best-way-to-localize-addons/m-p/663962#M10411</guid>
      <dc:creator>Carrast</dc:creator>
      <dc:date>2025-05-28T13:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to localize addons?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Best-way-to-localize-addons/m-p/664005#M10412</link>
      <description>&lt;P&gt;&lt;SPAN class="aNeGP0gI0B9AV8JaHPyH" data-src-align="0:6"&gt;Just&lt;/SPAN&gt;&lt;SPAN&gt; a &lt;/SPAN&gt;&lt;SPAN class="aNeGP0gI0B9AV8JaHPyH" data-src-align="7:9"&gt;remark&lt;/SPAN&gt; &lt;SPAN class="aNeGP0gI0B9AV8JaHPyH" data-src-align="17:2"&gt;not&lt;/SPAN&gt; &lt;SPAN class="aNeGP0gI0B9AV8JaHPyH" data-src-align="20:1"&gt;about&lt;/SPAN&gt; &lt;SPAN class="aNeGP0gI0B9AV8JaHPyH" data-src-align="22:11"&gt;localization&lt;/SPAN&gt;&lt;SPAN class="aNeGP0gI0B9AV8JaHPyH" data-src-align="33:1"&gt;,&lt;/SPAN&gt; &lt;SPAN class="aNeGP0gI0B9AV8JaHPyH" data-src-align="35:1"&gt;but&lt;/SPAN&gt; &lt;SPAN class="aNeGP0gI0B9AV8JaHPyH" data-src-align="37:1"&gt;about&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;preprocessor definitions of the &lt;/SPAN&gt;&lt;SPAN class="aNeGP0gI0B9AV8JaHPyH" data-src-align="51:8"&gt;resource&lt;/SPAN&gt; &lt;SPAN class="aNeGP0gI0B9AV8JaHPyH" data-src-align="39:11"&gt;compiler.&lt;BR /&gt;Actually I think rc.exe supports&amp;nbsp;&lt;SPAN&gt;preprocessor definitions in a command line.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="aNeGP0gI0B9AV8JaHPyH" data-src-align="39:11"&gt;&lt;SPAN&gt;&lt;BR /&gt;It should work, for commanf line of AddOn_Main.rc2, like&lt;BR /&gt;rc /dGER&amp;nbsp; (+ other options)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="aNeGP0gI0B9AV8JaHPyH" data-src-align="39:11"&gt;&lt;SPAN&gt;&lt;BR /&gt;#if defined (GER)&lt;BR /&gt;#include "addon_ger.grc.rc2"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="aNeGP0gI0B9AV8JaHPyH" data-src-align="39:11"&gt;&lt;SPAN&gt;#else&amp;nbsp;&lt;BR /&gt;#include "addon_int.grc.rc2"&lt;BR /&gt;#endif&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 May 2025 13:53:11 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Best-way-to-localize-addons/m-p/664005#M10412</guid>
      <dc:creator>Oleg</dc:creator>
      <dc:date>2025-05-28T13:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to localize addons?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Best-way-to-localize-addons/m-p/664008#M10413</link>
      <description>&lt;P&gt;Hi Carrast,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also have most of my Add-Ons in English &amp;amp; German. I'm using this CMake template (but forked a few years ago and adapted since): &lt;A href="https://github.com/GRAPHISOFT/archicad-addon-cmake" target="_blank"&gt;https://github.com/GRAPHISOFT/archicad-addon-cmake&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The CMakeLists.txt sets the resource path to a language specific directory "RINT" / "RGER" as you have it. But in this directories, the resource file has the same name! So it's "RINT/addon.grc" and "RGER/addon.grc" then in the "RFIX.win/AddOnMain.rc2" the file is included as "addon.grc.rc2".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe adapting this to your setup could work too?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps,&lt;/P&gt;
&lt;P&gt;Bernd&lt;/P&gt;</description>
      <pubDate>Wed, 28 May 2025 13:54:57 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Best-way-to-localize-addons/m-p/664008#M10413</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2025-05-28T13:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to localize addons?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Best-way-to-localize-addons/m-p/664156#M10425</link>
      <description>&lt;P&gt;Thank you Bernd!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This was the solution!&lt;/P&gt;&lt;P&gt;You have to configure your .vcxproj a bit (change the ..\ComplieResources.py INT to GER) but then it's working!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards!&lt;/P&gt;</description>
      <pubDate>Fri, 30 May 2025 11:28:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Best-way-to-localize-addons/m-p/664156#M10425</guid>
      <dc:creator>Carrast</dc:creator>
      <dc:date>2025-05-30T11:28:41Z</dc:date>
    </item>
  </channel>
</rss>

