diff --git a/examples/example.php b/examples/example.php index 2557674..fe1631e 100644 --- a/examples/example.php +++ b/examples/example.php @@ -16,4 +16,8 @@ echo $lang->get('fail'); echo '
';
 print_r($lang->getAll());
-echo '
'; \ No newline at end of file +echo ''; + +$lang->set('Test in english', 'test', 'en'); +$lang->set('Test auf Deutsch', 'test', 'de'); +echo $lang->get('test'); \ No newline at end of file diff --git a/lang.class.php b/lang.class.php index 09ee481..6f561c3 100644 --- a/lang.class.php +++ b/lang.class.php @@ -117,4 +117,10 @@ class lang } } } + + //Set Langstrings + function set($string, $identifier, $lang) + { + $this->langfiles[$lang]['langstrings'][$identifier] = $string; + } } \ No newline at end of file