['card' => 'images/credit_cards/Test-Visa-Icon.png', 'text' => 'Visa'], 2 => ['card' => 'images/credit_cards/Test-MasterCard-Icon.png', 'text' => 'Master Card'], 4 => ['card' => 'images/credit_cards/Test-AmericanExpress-Icon.png', 'text' => 'American Express'], 8 => ['card' => 'images/credit_cards/Test-Diners-Icon.png', 'text' => 'Diners'], 16 => ['card' => 'images/credit_cards/Test-Discover-Icon.png', 'text' => 'Discover'] ]; define('CREDIT_CARDS', serialize($creditCards)); $cachedTables = [ 'currencies' => 'App\Models\Currency', 'sizes' => 'App\Models\Size', 'industries' => 'App\Models\Industry', 'timezones' => 'App\Models\Timezone', 'dateFormats' => 'App\Models\DateFormat', 'datetimeFormats' => 'App\Models\DatetimeFormat', 'languages' => 'App\Models\Language', 'paymentTerms' => 'App\Models\PaymentTerm', 'paymentTypes' => 'App\Models\PaymentType', 'countries' => 'App\Models\Country', 'invoiceDesigns' => 'App\Models\InvoiceDesign', 'invoiceStatus' => 'App\Models\InvoiceStatus', 'frequencies' => 'App\Models\Frequency', 'gateways' => 'App\Models\Gateway', 'gatewayTypes' => 'App\Models\GatewayType', 'fonts' => 'App\Models\Font', 'banks' => 'App\Models\Bank', ]; define('CACHED_TABLES', serialize($cachedTables)); // TODO remove these translation functions function uctrans($text) { return ucwords(trans($text)); } // optional trans: only return the string if it's translated function otrans($text) { $locale = Session::get(SESSION_LOCALE); if ($locale == 'en') { return trans($text); } else { $string = trans($text); $english = trans($text, [], 'en'); return $string != $english ? $string : ''; } } // include modules in translations function mtrans($entityType, $text = false) { if ( ! $text) { $text = $entityType; } // check if this has been translated in a module language file if ( ! Utils::isNinjaProd() && $module = Module::find($entityType)) { $key = "{$module->getLowerName()}::texts.{$text}"; $value = trans($key); if ($key != $value) { return $value; } } return trans("texts.{$text}"); } }