Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- define('Nominative', 0);
- define('Genitive', 1);
- define('Dativ', 2);
- define('Accusative', 3);
- define('Instrumentativ', 4);
- define('Prepozitiv', 5);
- $_declentions = array(
- 'Семейные споры' => array(
- Nominative => 'Семейные споры',
- Genitive => 'Семейных спор',
- Dativ => 'Семейным спорам',
- Accusative => 'Семейных спор',
- Instrumentativ => 'Семейными спорами',
- Prepozitiv => 'Семейных спорах',
- ),
- 'Недвижимость' => array(
- Nominative => 'Недвижимость',
- Genitive => 'Недвижимости',
- Dativ => 'Недвижимости',
- Accusative => 'Недвижимость',
- Instrumentativ => 'Недвижимостью',
- Prepozitiv => 'Недвижимости',
- )
- );
- function __($word, $declention = Nominative){
- global $_declentions;
- if (!isset($_declentions[$word][$declention])) {
- return $word;
- } else {
- return $_declentions[$word][$declention];
- }
- }
- ?>
- пиздеж о <?= __('Недвижимость', Dativ) ?>
- всякая чушь о <?= __('Семейные споры', Prepozitiv) ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement