<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Translations]]></title>
		<link>https://frontaccounting.com/punbb/index.php</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;fid=2&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent topics at FrontAccounting forum.]]></description>
		<lastBuildDate>Wed, 25 Mar 2026 12:20:11 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Translate FrontHRM module]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?id=10716&amp;action=new</link>
			<description><![CDATA[<p>Hi,<br />I am interesting for your project and try to reasrech all components.<br />I translate frontaccunt to serbian but I cannot translate FrontHRM module.</p><p>At the same time when I translate frontacount to serbian I need click many times on menu to see translate.</p><p>Thks in advance</p>]]></description>
			<author><![CDATA[null@example.com (aradakovic)]]></author>
			<pubDate>Wed, 25 Mar 2026 12:20:11 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?id=10716&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Turkish translation team]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?id=10707&amp;action=new</link>
			<description><![CDATA[<p>I want join the Turkish translation team. The admins of the team please contact me.</p>]]></description>
			<author><![CDATA[null@example.com (ayhankiziltan)]]></author>
			<pubDate>Sun, 01 Feb 2026 22:17:12 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?id=10707&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Get Translation Tool]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?id=10685&amp;action=new</link>
			<description><![CDATA[<p>Hi, I don&#039;t know if this post should be placed here, but if someone find this useful (PHP PO File extractor) to build a .pot / .po for your custom FrontAccounting module.</p><p>1) Put the extractor in your FA tree fa-pot.php at the FrontAccounting root (same folder that has index.php).<br />Example path when using XAMPP: C:\xampp\htdocs\frontaccounting\fa-pot.php</p><p>2) Run it against your custom module<br />You pass the module folder as the argument and redirect output to a .pot file.</p><p>Windows (XAMPP)<br />Open CMD<br />cd C:\xampp\htdocs\frontaccounting<br />C:\xampp\php\php.exe fa-pot.php modules\YourModule &gt; modules\YourModule\lang\new_language_template\LC_MESSAGES\yourmodule.pot&nbsp; Note:This will create the clean PO file without translations</p><p>Linux / macOS<br />open console<br />cd /var/www/html/frontaccounting<br />php fa-pot.php modules/YourModule &gt; modules/YourModule/lang/new_language_template/LC_MESSAGES/yourmodule.pot&nbsp; Note:This will create the clean PO file without translations</p><p>Make sure the lang/new_language_template/LC_MESSAGES folders exists inside your module (create it if not).</p><p>3) What the script actually extracts<br />By default it scans files with extensions:<br />.php .inc .tpl .phtml .db&nbsp; and pulls strings from these gettext calls:<br />_(&quot;msg&quot;) / gettext(&quot;msg&quot;)<br />ngettext(&quot;singular&quot;,&quot;plural&quot;, $n)<br />pgettext(&quot;context&quot;,&quot;msg&quot;) / _p(&quot;context&quot;,&quot;msg&quot;)<br />Only literal strings are captured (that’s how gettext tools work).<br />If you have code like _(&quot;Hello &quot;.$name), rewrite it to:<br />sprintf(_(&quot;Hello %s&quot;), $name)<br />so the constant part is extractable.</p><p>4) Customizing (if your code uses other wrappers or file types)<br />Open fa-pot.php and edit:<br />Recognized functions (near the top, $KEYS):<br />&#039;_&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt; [&#039;type&#039;=&gt;&#039;simple&#039;,&#039;args&#039;=&gt;[1]],<br />&#039;gettext&#039;&nbsp; =&gt; [&#039;type&#039;=&gt;&#039;simple&#039;,&#039;args&#039;=&gt;[1]],<br />&#039;ngettext&#039; =&gt; [&#039;type&#039;=&gt;&#039;plural&#039;,&#039;args&#039;=&gt;[1,2]],<br />&#039;pgettext&#039; =&gt; [&#039;type&#039;=&gt;&#039;context&#039;,&#039;args&#039;=&gt;[1,2]],<br />&#039;_p&#039;&nbsp; &nbsp; &nbsp; &nbsp;=&gt; [&#039;type&#039;=&gt;&#039;context&#039;,&#039;args&#039;=&gt;[1,2]],<br />// add your own, e.g.<br />// &#039;N_&#039; =&gt; [&#039;type&#039;=&gt;&#039;simple&#039;,&#039;args&#039;=&gt;[1]],</p><p>Scanned extensions ($EXTS):<br />$EXTS = [&#039;php&#039;,&#039;inc&#039;,&#039;tpl&#039;,&#039;phtml&#039;, &#039;db&#039;]; // add &#039;module&#039; or others if you need</p><p>5) Create a locale .po from the .pot<br />If you have GNU gettext tools, this is easiest:<br /># Example for Spanish (Spain)<br />msginit --no-translator \<br />&nbsp; --input=modules/YourModule/lang/new_language_template/LC_MESSAGES/yourmodule.pot \<br />&nbsp; --locale=es_ES.UTF-8 \<br />&nbsp; --output-file=modules/YourModule/lang/new_language_template/LC_MESSAGES/es_ES.po<br />No gettext tools? Just copy the .pot to .po and edit the header:<br /># in modules/YourModule/lang/new_language_template/LC_MESSAGES/es_ES.po<br />&quot;Language: es_ES\n&quot;<br />&quot;Content-Type: text/plain; charset=UTF-8\n&quot;<br />&quot;Plural-Forms: nplurals=2; plural=(n != 1);\n&quot;<br />Common plural forms:<br />Spanish/English: nplurals=2; plural=(n != 1);<br />French: nplurals=2; plural=(n &gt; 1);<br />Portuguese (pt_BR): nplurals=2; plural=(n &gt; 1);<br />Keep files UTF-8 (no BOM).</p><p>6) Where to keep the files in a FA module<br />A simple, module-local layout works fine:<br />modules/YourModule/<br /> lang/<br />&nbsp; &nbsp; yourmodule.pot<br />&nbsp; &nbsp; es_ES.po<br />&nbsp; &nbsp; fr_FR.po<br />FrontAccounting typically uses its own PO loader (not PHP’s gettext() extension), so you don’t need .mo unless your code explicitly uses native gettext. If you do, compile with:<br />msgfmt -o modules/YourModule/lang/es_ES.mo modules/YourModule/lang/es_ES.po</p><p>7) Quick sanity check<br />Open the generated .pot — you should see blocks like:<br />#: modules/YourModule/somefile.php:42<br />msgid &quot;Customer&quot;<br />msgstr &quot;&quot;<br />If it’s empty:<br />Your strings might be dynamic/concatenated.<br />File extensions not in $EXTS.<br />Wrapper names not listed in $KEYS.<br />Wrong path passed to the script.</p><p>8) Tiny example<br />Source:<br />echo _(&quot;Customer&quot;);<br />echo sprintf(_(&quot;Open %s invoice&quot;), $ref);<br />echo ngettext(&quot;%d item&quot;,&quot;%d items&quot;, $n);<br />echo pgettext(&quot;button&quot;,&quot;Save&quot;);<br />Extracted (snippet):<br />msgid &quot;Customer&quot;<br />msgstr &quot;&quot;<br />msgid &quot;Open %s invoice&quot;<br />msgstr &quot;&quot;<br />msgid &quot;%d item&quot;<br />msgid_plural &quot;%d items&quot;<br />msgstr[0] &quot;&quot;<br />msgstr[1] &quot;&quot;<br />msgctxt &quot;button&quot;<br />msgid &quot;Save&quot;<br />msgstr &quot;&quot;</p><p>9) Typical errors &amp; fixes<br />Path not found: modules/YourModule<br />→ Check the path you pass to the script; use quotes if there are spaces.<br />&#039;php&#039; is not recognized on Windows<br />→ Use full path to php.exe: C:\xampp\php\php.exe.<br />Empty POT or missing lines<br />→ Strings are not literal or wrappers/EXTS not configured.<br />Encoding/accents look broken<br />→ Ensure source files and PO are UTF-8 and header has charset=UTF-8.</p><p>I would love if someone do this more &quot;user friendly&quot; so an average person can translate the system and modules to any language</p>]]></description>
			<author><![CDATA[null@example.com (fburbano)]]></author>
			<pubDate>Thu, 02 Oct 2025 18:36:31 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?id=10685&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Installation new persian language]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?id=10649&amp;action=new</link>
			<description><![CDATA[<p>Hi<br />I have translated the empty.po file of FrontAccounting into <a href="https://en.wikipedia.org/wiki/Dari">Persian-Afgan</a>, but I am unable to install it. I have tried a lot but couldn&#039;t get it to work.</p>]]></description>
			<author><![CDATA[null@example.com (nazirsayedquli)]]></author>
			<pubDate>Sat, 12 Apr 2025 05:19:07 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?id=10649&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Translation using googletranslate]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?id=10614&amp;action=new</link>
			<description><![CDATA[<p>I was always interested in online translations. So I asked my friend chatgpt to help me translate empty.po to Arabic just to see how they behave as an AI gurus. They failed saying the best for me is to use googletranslate and they offered me help with a python script. The script that uses googletranslate failed also, so they suggested deep-translate. After many tries and errors I came out with this script. I use Linux Zorin which is a flavour of Ubuntu. So for the script to run one needs to install python3 and the other modules for it to work. <br />So here we go.</p><p>to install python 3</p><div class="codebox"><pre><code> sudo apt install python3 </code></pre></div><p>After python 3 installation<br /></p><div class="codebox"><pre><code> pip install deep-translator </code></pre></div><p>And</p><div class="codebox"><pre><code> pip install polib </code></pre></div><p>And here is the script which I called translate.py</p><div class="codebox"><pre><code>import time
import re
from deep_translator import GoogleTranslator
from polib import pofile

# Load the .po file
po_file = pofile(&#039;empty.po&#039;)

# Update the Content-Type in the header to UTF-8
po_file.metadata[&#039;Content-Type&#039;] = &#039;text/plain; charset=UTF-8&#039;

# Initialize the translator
translator = GoogleTranslator(source=&#039;auto&#039;, target=&#039;ar&#039;)

# Define a regex pattern to match `&amp;` before or after an alphanumeric character
mnemonic_pattern = re.compile(r&quot;(?&lt;=\w)&amp;|&amp;(?=\w)&quot;)

# Counters for statistics
total_entries = len(po_file)
translated_count = 0
failed_count = 0

# Start the timer
start_time = time.time()

# Process each entry in the .po file
for entry in po_file:
    # Translate if msgstr is empty
    if not entry.msgstr:
        try:
            print(f&quot;Translating: {entry.msgid}&quot;)  # Debug print
            translated_text = translator.translate(entry.msgid)
            
            # After translating, remove mnemonics from the translated text
            entry.msgstr = re.sub(mnemonic_pattern, &quot;&quot;, translated_text)
            
            translated_count += 1
            print(f&quot;Translated: {entry.msgstr}&quot;)  # Debug print
            
        except Exception as e:
            print(f&quot;Warning: Failed to translate &#039;{entry.msgid}&#039; due to {e}&quot;)
            entry.msgstr = &quot;Translation Failed&quot;
            failed_count += 1
    else:
        # If already translated, remove mnemonics from the existing translation
        entry.msgstr = re.sub(mnemonic_pattern, &quot;&quot;, entry.msgstr)

# Ensure all msgstr values are not None before saving
for entry in po_file:
    if entry.msgstr is None:
        entry.msgstr = &quot;&quot;

# Calculate the elapsed time
end_time = time.time()
elapsed_time = end_time - start_time

# Convert elapsed time to hours, minutes, and seconds
hours, rem = divmod(elapsed_time, 3600)
minutes, seconds = divmod(rem, 60)

# Save the translated .po file
output_filename = &#039;translated_arabic.po&#039;
try:
    po_file.save(output_filename)
    print(f&quot;\nTranslation complete. The file is saved as &#039;{output_filename}&#039;&quot;)
except Exception as e:
    print(f&quot;Error saving the file: {e}&quot;)

# Print translation statistics
print(&quot;\n--- Translation Statistics ---&quot;)
print(f&quot;Total entries: {total_entries}&quot;)
print(f&quot;Successfully translated: {translated_count}&quot;)
print(f&quot;Failed to translate: {failed_count}&quot;)
print(f&quot;Elapsed time: {int(hours)}h {int(minutes)}m {int(seconds)}s&quot;)</code></pre></div><p>In the script I had to get rid of the &amp; keyboard mnemonic as it does not work in any translation and should be changed in the code. i.e &amp;Items is not translatable to what it should do once one presses Alt-I.</p><p>The above script is for Arabic as target=&#039;ar&#039;<br />It works for most languages just by specifying the target language. i.e I tried it for Tamil target=&#039;ta&#039;. It works. Do not forget to change the output_filename = &#039;translated_arabic.po&#039; to whatever you like.</p><br /><p>To run the scrip</p><div class="codebox"><pre><code> python3 translate.py </code></pre></div><p>As of all online translations its OK at about 70%. The rest is out of context and needs to be edited manually. Thats where one uses poedit to correct the 30%.</p><p>Just note. It took 40 minutes for Arabic Translation with 6 errors and 28 minutes for Tamil Translations with no errors. Total strings translated 3498.</p>]]></description>
			<author><![CDATA[null@example.com (rafat)]]></author>
			<pubDate>Fri, 08 Nov 2024 15:15:55 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?id=10614&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Update zh_CN Language in repo]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?id=10592&amp;action=new</link>
			<description><![CDATA[<p>Kindly update zh_CN Language in repo.</p><p>zh_TW is more complete though.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Thu, 05 Sep 2024 16:30:07 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?id=10592&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Problem with any language other than English not working on the system]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?id=10518&amp;action=new</link>
			<description><![CDATA[<p>I have a version on GoDaddy hosting, and it has been working for over a year without any problems. Suddenly, the language changed from Arabic to English, and I discovered that when I tried to activate another language, no language works other than the basic English language. I contacted GoDaddy&#039;s support service, and they informed me that there is no problem with the hosting. I don&#039;t know where the problem is. Everything was fine, but the problem occurred without any clear reason.</p><p>&quot;Please help me solve this problem because I couldn&#039;t find a solution.&quot;</p>]]></description>
			<author><![CDATA[null@example.com (AhmedSelim)]]></author>
			<pubDate>Wed, 15 May 2024 08:17:35 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?id=10518&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Kindly update Tamil and Hindi translations in the extensions repo]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?id=10507&amp;action=new</link>
			<description><![CDATA[<p>@joe: I have updated the extensions for Tamil and Hindi languages at: https://github.com/apmuthu/frontac24/commit/29cc99ff3938e31e7e8160508e85cfcb942300c9</p><p>Also attached them here for ease of integration into the official Extensions Repo.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sat, 27 Apr 2024 09:20:40 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?id=10507&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[How to update translation]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?id=10495&amp;action=new</link>
			<description><![CDATA[<p>Hello and thank you for your hard work.</p><p>I am new here and installed Frontaccounting at the shared hoster <a href="https://www.netcup.eu/">Netcup</a> with no problems.</p><p>But installing language package went into the message &quot;Cannot download repo index file.&quot; This was my first problem.</p><p>Second I downloaded mo and po files local and installed it manually. But I found many strings untranslated (german). So I&#039;d like to help in german translation. Is there any central platform where we can do it? If not, where can I get a file with all translatable strings to complete german translation? And where to send it to help other people?</p><p>Thank you</p>]]></description>
			<author><![CDATA[null@example.com (SIR)]]></author>
			<pubDate>Wed, 03 Apr 2024 04:59:02 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?id=10495&amp;action=new</guid>
		</item>
	</channel>
</rss>
