aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-10-06 17:40:58 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-10-06 17:40:58 -0700
commitc7c3db8c54ada33c785a7303de582a3d0c1a14ee (patch)
treebb25fb74754d6f124b73b70f50ddc228e6399f59 /boot.php
parent9f0cedad8e4f4063db7c8ee5cd9821ff10e39ea0 (diff)
downloadvolse-hubzilla-c7c3db8c54ada33c785a7303de582a3d0c1a14ee.tar.gz
volse-hubzilla-c7c3db8c54ada33c785a7303de582a3d0c1a14ee.tar.bz2
volse-hubzilla-c7c3db8c54ada33c785a7303de582a3d0c1a14ee.zip
i18n officially ready for prime time.
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/boot.php b/boot.php
index 7bf3e75a6..194ee6a01 100644
--- a/boot.php
+++ b/boot.php
@@ -169,6 +169,15 @@ class App {
}}
+// retrieve the App structure
+// useful in functions which require it but don't get it passed to them
+
+if(! function_exists('get_app')) {
+function get_app() {
+ global $a;
+ return $a;
+}};
+
// Multi-purpose function to check variable state.
// Usage: x($var) or $x($array,'key')
@@ -269,19 +278,21 @@ function replace_macros($s,$r) {
// load string tranlsation table for alternate language
-// not yet implemented
if(! function_exists('load_translation_table')) {
function load_translation_table($lang) {
global $a;
+ if(file_exists("view/$lang/strings.php"))
+ include("view/$lang/strings.php");
}}
// translate string if translation exists
if(! function_exists('t')) {
function t($s) {
- global $a;
+
+ $a = get_app();
if($a->strings[$s])
return $a->strings[$s];