|
From: <dai...@us...> - 2013-12-10 09:38:49
|
Revision: 6488
http://sourceforge.net/p/web-erp/reponame/6488
Author: daintree
Date: 2013-12-10 09:38:45 +0000 (Tue, 10 Dec 2013)
Log Message:
-----------
use currencies array for currency name translations
Modified Paths:
--------------
trunk/Customers.php
trunk/includes/LanguageSetup.php
Modified: trunk/Customers.php
===================================================================
--- trunk/Customers.php 2013-12-09 19:26:42 UTC (rev 6487)
+++ trunk/Customers.php 2013-12-10 09:38:45 UTC (rev 6488)
@@ -3,6 +3,7 @@
/* $Id$ */
include('includes/session.inc');
+include('includes/CurrenciesArray.php');
if (isset($_POST['Edit']) or isset($_GET['Edit']) or isset($_GET['DebtorNo'])) {
$ViewTopic = 'AccountsReceivable';
@@ -985,11 +986,9 @@
}
if (isset($_GET['Modify'])) {
- $result=DB_query("SELECT currency FROM currencies WHERE currabrev='".$_POST['CurrCode']."'",$db);
- $myrow=DB_fetch_array($result);
echo '<tr>
<td>' . _('Customer Currency') . ':</td>
- <td>' . _($myrow['currency']) . '</td></tr>'; // Translates from currencies.currency ***
+ <td>' . $CurrenciesArray[$_POST['CurrCode']]['Currency'] . '</td></tr>'; // Translates from currencies.currency ***
} else {
$result=DB_query("SELECT currency, currabrev FROM currencies",$db);
echo '<tr>
@@ -1000,7 +999,7 @@
if ($_POST['CurrCode']==$myrow['currabrev']){
echo ' selected="selected"';
}
- echo ' value="'. $myrow['currabrev'] . '">' . _($myrow['currency']) . '</option>'; // Translates from currencies.currency ***
+ echo ' value="'. $myrow['currabrev'] . '">' . $CurrenciesArray[$myrow['currabrev']]['Currency'] . '</option>'; // Translates from currencies.currency ***
} //end while loop
DB_data_seek($result,0);
echo '</select></td>
Modified: trunk/includes/LanguageSetup.php
===================================================================
--- trunk/includes/LanguageSetup.php 2013-12-09 19:26:42 UTC (rev 6487)
+++ trunk/includes/LanguageSetup.php 2013-12-10 09:38:45 UTC (rev 6488)
@@ -24,7 +24,7 @@
$Language = $_SESSION['Language'];
}
//Check users' locale format via their language
-//Then pass this information to the js for validation purpose
+//Then pass this information to the js for number validation purpose
$Collect = array('US'=> array('en_US.utf8','en_GB.utf8','ja_JP.utf8','hi_IN.utf8','sw_KE.utf8','tr_TR.utf8','vi_VN.utf8','zh_CN.utf8','zh_HK.utf8','zh_TW.utf8'),
'IN'=>array('en_IN.utf8'),
@@ -40,6 +40,7 @@
}
+
/*Since LanguagesArray requires the function _() to translate the language names - we must provide a substitute if it doesn't exist aready before we include includes/LanguagesArray.php
* */
if (!function_exists('gettext')) {
|