https://github.com/pirosikick/label.php
https://github.com/pirosikick/label.php
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pirosikick/label.php
- Owner: pirosikick
- License: mit
- Created: 2012-11-25T15:27:36.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-12-03T03:52:16.000Z (over 12 years ago)
- Last Synced: 2025-02-26T15:54:17.436Z (3 months ago)
- Language: PHP
- Size: 152 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
label.php
=========[](https://travis-ci.org/pirosikick/label.php)
label.php manages set of text label.
Usage
-----
```php
array(
'firstname' => 'Hiroyuki',
'lastname' => 'Anai',
),
));echo $employees['hanai.firstname'], "\n"; // Hiroyuki
echo $employees['hanai.lastname'], "\n"; // Anai$error = new Label\LabelSet(array(
'jp' => array(
'404' => "'%s'が見つかりません",
),
'en' => array(
'404' => "'%s' not found",
),
));echo $error['jp.404']->sprintf('http://hoge.jp/'), "\n"; // 'http://hoge.jp'が見つかりません
echo $error['en.404']->sprintf('http://hoge.com/'), "\n"; // 'http://hoge.com' not found
```