<?php
require_once __DIR__ . '/vendor/autoload.php'
$locale = 'ru';
// throw exceptions [optional] default: false
$strict = true;
$trans = new Trans([path-to-dir-dictionaries], $locale, $strict);
print_r($trans->get('Hello, World!'));
/**
* Exception: not found dictionary
* $trans->setLocale('de');
* $trans->get('Hello, World!')
*/
// silent mode
$locale = 'de';
$trans = new Trans([path-to-dir-dictionaries], $locale);
// output: Hello, World!
print_r($trans->get('Hello, World!'));
This repository has been archived by the owner on Aug 14, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
NovikovRoman/Trans
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|