aboutsummaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorBenjamin Peter2017-12-09 23:44:47 +0100
committerdedeibel2017-12-10 18:25:21 +0100
commitbe515f5150f20c773371f680efad58f2d0fcaaf0 (patch)
tree2035fa3a60399686b6c5f6e381124be68c5c667e /index.php
parent65397e5734b1439df4d68be40ffe994f26e551ec (diff)
Added multple translation tracks with configurable endpoints and labels
Diffstat (limited to 'index.php')
-rw-r--r--index.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/index.php b/index.php
index 3c814f9..43a704e 100644
--- a/index.php
+++ b/index.php
@@ -285,12 +285,12 @@ try {
require('view/room.php');
}
- else if(preg_match('@^([^/]+)/translated$@', $route, $m))
+ else if(preg_match('@^([^/]+)/i18n/([^/]+)$@', $route, $m))
{
$_GET = array(
'room' => $m[1],
'selection' => '',
- 'language' => 'translated',
+ 'language' => $m[2],
);
require('view/room.php');
}
@@ -305,17 +305,19 @@ try {
require('view/room.php');
}
- else if(preg_match('@^([^/]+)/(sd|audio|slides|dash)/translated$@', $route, $m))
+ else if(preg_match('@^([^/]+)/(sd|audio|slides|dash)/i18n/([^/]+)$@', $route, $m))
{
$_GET = array(
'room' => $m[1],
'selection' => $m[2],
- 'language' => 'translated',
+ 'language' => $m[3],
);
require('view/room.php');
}
- else if(preg_match('@^embed/([^/]+)/(hd|sd|audio|slides)/(native|translated|stereo)(/no-autoplay)?$@', $route, $m))
+ // TODO use dynamic i18n parameter
+ // TODO change to no-autoplay query parameter?
+ else if(preg_match('@^embed/([^/]+)/(hd|sd|audio|slides)/(native|translated|translated2|stereo)(/no-autoplay)?$@', $route, $m))
{
$_GET = array(
'room' => $m[1],