<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Problem with gettex.]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=394&amp;type=atom" />
	<updated>2008-11-16T12:41:46Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=394</id>
		<entry>
			<title type="html"><![CDATA[Re: Problem with gettex.]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=1414#p1414" />
			<content type="html"><![CDATA[<p>Linux have ru_RU,&nbsp; ru_RU.utf8. A have interface Latvian, Russian, English but information in database Latvian, some Russian and english. </p><p>I am understante, what way replace gettext_() not so good. But for it work fine. if need upgate, i can againt raplate all _() in all file it quickle&nbsp; and go work.</p>]]></content>
			<author>
				<name><![CDATA[straga]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=246</uri>
			</author>
			<updated>2008-11-16T12:41:46Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=1414#p1414</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with gettex.]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=1401#p1401" />
			<content type="html"><![CDATA[<p>Well, you said that gettext does not work on Linux box. This is not the case. To use say russian translation under linux you must have both FA ru_RU translation file and system locales in the same encoding. So if you want to have russian user interface on linux box where you have only ru_RU.utf-8 locales you must recode messages file, or translate it from scratch. The ru_RU.po file in download section of frontaccounting.com is encoded in ISO-8859-5, not UTF-8.</p><p>Your method to replace all the gettext _() calls makes your system not upgradable. But if you wish, you can of course do it this way. I wanted to say this all is not needed to make FA work in Russian , Latvian, Farsi or any other language if you have messages translated.</p><p>Janusz</p>]]></content>
			<author>
				<name><![CDATA[itronics]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=89</uri>
			</author>
			<updated>2008-11-14T15:03:17Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=1401#p1401</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with gettex.]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=1400#p1400" />
			<content type="html"><![CDATA[<p>One more monent. is fail for translate ru_RU.po a change encoding: UTF-8</p><p>I use: English, Latvia, Russian in one page. If encoding page UTF-8 not problemm. if each has its own encoding is problem. For me right local UTF-8.</p><p>FrontAccouting have php_translate it fine for me.</p>]]></content>
			<author>
				<name><![CDATA[straga]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=246</uri>
			</author>
			<updated>2008-11-14T13:38:10Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=1400#p1400</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with gettex.]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=1398#p1398" />
			<content type="html"><![CDATA[<p>Hello straga,</p><p>I&#039;ve just checked russian translation under Debian Linux and the translation works, although declarared&nbsp; 20% of translated messages is optimistic approximation.</p><p>To have any localization with gettext working&nbsp; you have to install respective locales. As I see your test was done with utf-8 sample, but the translation file for FA use iso-8859-5 encoding, so it will not work until you make something like:<br />dpkg-reconfigure locales<br />and select right locale to install i.e. ru_RU iso-8859-5.<br />After apache restart you have some messages translated, but as I said not too much. If you wish to translate the rest you can send the results to us to share with other users.<br />Janusz</p><p>Above applies to Debian but also should work on its derivative Ubuntu.<br />Good luck.</p>]]></content>
			<author>
				<name><![CDATA[itronics]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=89</uri>
			</author>
			<updated>2008-11-13T22:13:13Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=1398#p1398</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Problem with gettex.]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=1397#p1397" />
			<content type="html"><![CDATA[<p>In windows(Xampp) - <br />gettext_native - Work but all text no in rigth code. web-page in UTF-8, base utf-8. Text in ISO-8859-5. GetText in php on.<br />gettext_php_traslate - work fine and code is correct. But need OFF GetText in PHP.</p><p>LINUX(Ubuntu 8.04)<br />gettext is ok, I check with this script http://php.russofile.ru/resources/archives/0000/gettext_sample.zip. and is work.<br />In FrontAccounting not work. Need again turn off Gettext and ... .</p><p>AND how a change without OFF gettext</p><p>I am change function _(&#039;Test&#039;) in T_(&#039;Test&#039;).<br />in all files *.php and *.inc. &#039;_(&#039; in &#039;T_(&#039;&nbsp; .</p><p>and change in frontaccount\includes\lang\gettext.php <br />line : 130 - 133. this TunON php_gettext ALLTIME<br />....<br />if (function_exists(&#039;gettext&#039;)) <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //&nbsp; return get_text::_support(new gettext_native_support());<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return get_text::_support(new gettext_php_support());<br />}<br />....</p><p>and change in frontaccount\includes\lang\language.php</p><p>if (!function_exists(&quot;_&quot;)) <br />{<br />&nbsp; &nbsp; function T_($text) <br />&nbsp; &nbsp; &nbsp; &nbsp;//function _($text) <br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; $retVal = get_text::gettext($text);<br />&nbsp; &nbsp; &nbsp; &nbsp; if ($retVal == &quot;&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return $text;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; return $retVal;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; }<br />}</p><p>//new function <br />function T_($text) <br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; $retVal = get_text::gettext($text);<br />&nbsp; &nbsp; &nbsp; &nbsp; if ($retVal == &quot;&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return $text;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; return $retVal;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; }<br />//new function</p>]]></content>
			<author>
				<name><![CDATA[straga]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=246</uri>
			</author>
			<updated>2008-11-13T18:12:18Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=1397#p1397</id>
		</entry>
</feed>
