<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Lazarus Pascal - Localization - Fix: Resourcestrings and/or units not included in POT file - Delphi, Lazarus, Free Pascal				            </title>
            <link>https://www.tweaking4all.com/forum/delphi-lazarus-free-pascal/lazarus-pascal-localization-fix-resourcestrings-and-or-units-not-included-in-pot-file/</link>
            <description>Tweaking4All.com Discussion Board</description>
            <language>en-US</language>
            <lastBuildDate>Wed, 20 May 2026 07:05:26 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>Lazarus Pascal - Localization - Fix: Resourcestrings and/or units not included in POT file</title>
                        <link>https://www.tweaking4all.com/forum/delphi-lazarus-free-pascal/lazarus-pascal-localization-fix-resourcestrings-and-or-units-not-included-in-pot-file/#post-5825</link>
                        <pubDate>Thu, 17 Apr 2025 07:20:55 +0000</pubDate>
                        <description><![CDATA[For those tinkering with localization, you may run into the issue I ran into: resourcestring of extra units would not appear in the POT files.
To generate POT files (template for PO files) ...]]></description>
                        <content:encoded><![CDATA[<p>For those tinkering with localization, you may run into the issue I ran into: <strong>resourcestring</strong> of extra units would not appear in the POT files.</p>
<p>To generate POT files (template for PO files) you'll need a few initial steps:</p>
<p>1) In <strong>Project</strong> -&gt; <strong>Project Options</strong> -&gt; check <strong>Enable i18n</strong> and check <strong>Force update PO files in next build</strong>.</p>
<p>Set the location where the POT files needs to be save.</p>
<p><em>Tip for macOS users:</em> <br />I always put my POT file in (manually make the "locale" directory after you had Lazarus create a project .app bundle).  <br />Lazarus trunk has been updated to work with that (alternative: call the directory "languages") - see <a href="https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/41592#note_2454850607" target="_blank" rel="noopener">Lazarus Pascal Bug Tracker</a>.<br />Also, to determine the locale string (2 character language code) see my earlier <a href="https://www.tweaking4all.com/forum/delphi-lazarus-free-pascal/lazarus-pascal-macos-how-to-get-the-locale-language-string-for-your-system/" target="_blank" rel="noopener">post here</a>.</p>
<pre contenteditable="false">project-directory/&lt;projectname&gt;.app/Contents/Resources/locale</pre>
675
<p>2) Add the unit <strong>LCLTranslator</strong> to the uses clause of your main unit.</p>
<p>3) Make sure all units that need translating are listed in the <strong>Project Inspector</strong>.</p>
<p>If you forget that last step, then extra units will NOT be included in the POT file - took me literally days to figure this one out.</p>
<p>I'm posting this here since I took me quite some research and testing (hence the found bug) to get this to even work.<br />Hope someone benefits from this &#x1f60a; </p>]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/delphi-lazarus-free-pascal/">Delphi, Lazarus, Free Pascal</category>                        <dc:creator>Hans</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/delphi-lazarus-free-pascal/lazarus-pascal-localization-fix-resourcestrings-and-or-units-not-included-in-pot-file/#post-5825</guid>
                    </item>
							        </channel>
        </rss>
		