added locale configuration to support foreign 'Sonderzeichen' (closes #107)
This commit is contained in:
parent
bd60e88b48
commit
7040bd0d06
3 changed files with 11 additions and 2 deletions
|
@ -86,6 +86,12 @@ $config['lib']['doctrine'] = VZ_DIR . '/lib/vendor/Doctrine';
|
||||||
*/
|
*/
|
||||||
//$config['timezone'] = 'Europe/Berlin';
|
//$config['timezone'] = 'Europe/Berlin';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Locale used for regular expressions
|
||||||
|
* @link http://php.net/manual/de/function.setlocale.php
|
||||||
|
*/
|
||||||
|
$config['locale'] = array('de_DE', 'en_US', 'C');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array of colors for plot series
|
* @var array of colors for plot series
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -46,6 +46,9 @@ Util\Configuration::load(VZ_DIR . '/etc/volkszaehler.conf');
|
||||||
$tz = (Util\Configuration::read('timezone')) ? Util\Configuration::read('timezone') : @date_default_timezone_get();
|
$tz = (Util\Configuration::read('timezone')) ? Util\Configuration::read('timezone') : @date_default_timezone_get();
|
||||||
date_default_timezone_set($tz);
|
date_default_timezone_set($tz);
|
||||||
|
|
||||||
|
// set locale
|
||||||
|
setlocale(LC_ALL, Util\Configuration::read('locale'));
|
||||||
|
|
||||||
// define include dirs for vendor libs
|
// define include dirs for vendor libs
|
||||||
define('DOCTRINE_DIR', Util\Configuration::read('lib.doctrine') ? Util\Configuration::read('lib.doctrine') : 'Doctrine');
|
define('DOCTRINE_DIR', Util\Configuration::read('lib.doctrine') ? Util\Configuration::read('lib.doctrine') : 'Doctrine');
|
||||||
define('JPGRAPH_DIR', Util\Configuration::read('lib.jpgraph') ? Util\Configuration::read('lib.jpgraph') : 'JpGraph');
|
define('JPGRAPH_DIR', Util\Configuration::read('lib.jpgraph') ? Util\Configuration::read('lib.jpgraph') : 'JpGraph');
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
{
|
{
|
||||||
"name" : "title",
|
"name" : "title",
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
"pattern" : "\/^[a-z0-9_ -]*$\/i",
|
"pattern" : "\/^[\\w\\.\\-\\,()\\]\\[!&*+\\/:@]+$\/u",
|
||||||
"max" : 255,
|
"max" : 255,
|
||||||
"translation" : {
|
"translation" : {
|
||||||
"de" : "Titel",
|
"de" : "Titel",
|
||||||
|
@ -103,7 +103,7 @@
|
||||||
{
|
{
|
||||||
"name" : "address:city",
|
"name" : "address:city",
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
"pattern" : "\/^[a-z.- ]*$\/i",
|
"pattern" : "\/^[\\w\\.\\-\\,() ]+$\/u",
|
||||||
"translation" : {
|
"translation" : {
|
||||||
"de" : "Stadt",
|
"de" : "Stadt",
|
||||||
"en" : "City"
|
"en" : "City"
|
||||||
|
|
Loading…
Add table
Reference in a new issue