diff --git a/.travis.yml b/.travis.yml index 60867aa..57f6ec9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,4 +4,4 @@ php: - '5.5' - '5.6' - '7.0' -script: phpunit lang.class.php \ No newline at end of file +script: phpunit test.php \ No newline at end of file diff --git a/lang.class.php b/lang.class.php index 769ba3d..6f561c3 100644 --- a/lang.class.php +++ b/lang.class.php @@ -1,7 +1,5 @@ setLangFolder('examples/langs/'); +$lang->setLang('examples/lang.es.php', 'es'); +$lang->setCurrentLang('de'); + +echo $lang->get('Home').'
'; +echo $lang->get('something').'
'; + +echo $lang->get('Home is where your wifi connects automatically').'
';//Get Languagestring by Languagestring + +$lang->setLang('examples/lang.de_extra.php', 'de'); +echo $lang->get('fail'); + +echo '
';
+print_r($lang->getAll());
+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