initialize translation

This commit is contained in:
2019-10-13 18:58:56 +02:00
parent df82b27d80
commit d8817d4f84
5 changed files with 1993 additions and 2125 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -45,6 +45,9 @@ class Spot extends Main
); );
parent::__construct($oClassManagement, $sProcessPage, $asClasses); parent::__construct($oClassManagement, $sProcessPage, $asClasses);
$this->oClassManagement->incClass('translator');
$this->oLang = new Translator('', 'en');
$this->oProject = new Project($this->oDb); $this->oProject = new Project($this->oDb);
$this->oMedia = new Media($this->oDb, $this->oProject); $this->oMedia = new Media($this->oDb, $this->oProject);
} }
@@ -124,7 +127,8 @@ class Spot extends Main
'geo_server' => Settings::GEO_SERVER, 'geo_server' => Settings::GEO_SERVER,
'modes' => Project::MODES, 'modes' => Project::MODES,
'site_timezone' => Settings::TIMEZONE, 'site_timezone' => Settings::TIMEZONE,
'site_timezone_desc' => self::getTimeZoneDesc(Settings::TIMEZONE) 'site_timezone_desc' => self::getTimeZoneDesc(Settings::TIMEZONE),
'trans' => $this->oLang->getTranslations()
) )
), ),
'index', 'index',

1
languages/en.lang Normal file
View File

@@ -0,0 +1 @@
page_og_desc=Keep contact with François when he is off hiking

1
languages/fr.lang Normal file
View File

@@ -0,0 +1 @@
page_og_desc=Gardez le contact avec François lorsqu'il part sur les chemins

View File

@@ -3,13 +3,12 @@
<head> <head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Gardez le contact avec François lorsqu'il part sur les chemins"> <meta name="description" content="[#]lang:page_og_desc[#]">
<meta property="og:title" content="Spotty" /> <meta property="og:title" content="Spotty" />
<meta property="og:description" content="Gardez le contact avec François lorsqu'il part sur les chemins" /> <meta property="og:description" content="[#]lang:page_og_desc[#]" />
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
<meta property="og:url" content="[#]host_url[#]" /> <meta property="og:url" content="[#]host_url[#]" />
<meta property="og:image" content="images/ogp.png" /> <meta property="og:image" content="images/ogp.png" />
<meta property="og:locale" content="fr_FR" />
<link rel="apple-touch-icon" sizes="180x180" href="images/icons/apple-touch-icon.png?v=GvmqYyKwbb"> <link rel="apple-touch-icon" sizes="180x180" href="images/icons/apple-touch-icon.png?v=GvmqYyKwbb">
<link rel="icon" type="image/png" sizes="32x32" href="images/icons/favicon-32x32.png?v=GvmqYyKwbb"> <link rel="icon" type="image/png" sizes="32x32" href="images/icons/favicon-32x32.png?v=GvmqYyKwbb">
<link rel="icon" type="image/png" sizes="16x16" href="images/icons/favicon-16x16.png?v=GvmqYyKwbb"> <link rel="icon" type="image/png" sizes="16x16" href="images/icons/favicon-16x16.png?v=GvmqYyKwbb">