Skip to content

Commit

Permalink
Organize locale
Browse files Browse the repository at this point in the history
Move translations from Application module scope to ./data/language for whole app.
Update translator config

Resolves: #6
  • Loading branch information
ma-si committed May 18, 2016
1 parent 798af97 commit e20c0e9
Show file tree
Hide file tree
Showing 46 changed files with 29 additions and 10 deletions.
29 changes: 29 additions & 0 deletions config/autoload/aist-locale.global.php
@@ -0,0 +1,29 @@
<?php

/**
* AistLocale (http://mateuszsitek.com/projects/aist-locale)
*
* @link http://github.com/ma-si/aist-locale for the canonical source repository
* @copyright Copyright (c) 2006-2016 Aist Internet Technologies (http://aist.pl) All rights reserved.
* @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
*/

return [
'translator' => [
//standard part
'locale' => 'pl_PL',
'translation_file_patterns' => [
'gettext' => [
'type' => 'gettext',
'base_dir' => './data/language',
'pattern' => '%s.mo',
],
],

// // aist-locale
// 'check_agent' => false,
//// 'check_agent' => true,
// 'plural_rule' => 'nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)',
// 'supported' => ['pl', 'pl-PL', 'en'],
],
];
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 0 additions & 10 deletions module/Application/config/module.config.php
Expand Up @@ -65,16 +65,6 @@
'translator' => 'Zend\Mvc\Service\TranslatorServiceFactory',
],
],
'translator' => [
'locale' => 'en_US',
'translation_file_patterns' => [
[
'type' => 'gettext',
'base_dir' => __DIR__ . '/../language',
'pattern' => '%s.mo',
],
],
],
'controllers' => [
'invokables' => [
'Application\Controller\Index' => Controller\IndexController::class,
Expand Down

0 comments on commit e20c0e9

Please sign in to comment.