Make radio page translatable
This makes the radio page use the station default language if one is set. Previously the pages where not really getting translated.
This commit is contained in:
parent
3196603dde
commit
c2deb94c16
|
@ -2,11 +2,13 @@
|
|||
|
||||
class EmbedController extends Zend_Controller_Action
|
||||
{
|
||||
public function init()
|
||||
{
|
||||
|
||||
public function init() {
|
||||
// translate widgets to station default language
|
||||
$locale = Application_Model_Preference::GetDefaultLocale();
|
||||
if ($locale) {
|
||||
Application_Model_Locale::configureLocalization($locale);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This is the action that is called to insert the player onto a web page.
|
||||
* It passes all the js and css files to the view, as well as all the
|
||||
|
|
|
@ -34,6 +34,12 @@ class IndexController extends Zend_Controller_Action
|
|||
|
||||
$this->_helper->layout->setLayout('radio-page');
|
||||
|
||||
// translate page to station default language
|
||||
$locale = Application_Model_Preference::GetDefaultLocale();
|
||||
if ($locale) {
|
||||
Application_Model_Locale::configureLocalization($locale);
|
||||
}
|
||||
|
||||
$this->view->stationLogo = Application_Model_Preference::GetStationLogo();
|
||||
|
||||
$stationName = Application_Model_Preference::GetStationName();
|
||||
|
|
|
@ -395,7 +395,7 @@
|
|||
<li></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a class="airtime_pro" target="_blank" href="<?php echo PRODUCT_SITE_URL; ?>">Powered by <?php echo PRODUCT_NAME; ?></a>
|
||||
<a class="airtime_pro" target="_blank" href="<?php echo PRODUCT_SITE_URL; ?>"><?php printf(_('Powered by %s'), PRODUCT_NAME); ?></a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
|
||||
<div class="schedule_content">
|
||||
<div ng-repeat="x in weekDays track by $index" ng-attr-id="{{'day-' + x.dayOfMonth}}" class="schedule_item">
|
||||
<div ng-if="isEmpty(x.shows)" class="row empty-schedule">Looks like there are no shows scheduled on this day.</div>
|
||||
<div ng-if="isEmpty(x.shows)" class="row empty-schedule"><?php echo _('Looks like there are no shows scheduled on this day.') ?></div>
|
||||
<div ng-repeat="show in x.shows" class="row">
|
||||
<div class="time_grid">{{show.show_start_hour}} - {{show.show_end_hour}}</div>
|
||||
<div class="name_grid">{{show.name}}</div>
|
||||
|
@ -93,7 +93,7 @@
|
|||
</div>
|
||||
|
||||
<div class="weekly-schedule-widget-footer" <?php if ($this->widgetStyle == "premium") echo "style='display:none'"; ?>>
|
||||
<a href="<?php echo PRODUCT_SITE_URL; ?>" target="_blank">Powered by <?php echo PRODUCT_NAME; ?></a>
|
||||
<a href="<?php echo PRODUCT_SITE_URL; ?>" target="_blank"><?php printf(_('Powered by %s'), PRODUCT_NAME); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -24,14 +24,14 @@
|
|||
echo "<a href='#' class='logo'><img src='data:image/png;base64," . $this->stationLogo . "'></a>";
|
||||
} ?>
|
||||
|
||||
<?php if ($this->displayLoginButton) {
|
||||
echo "<div class='login-btn'>
|
||||
<a href='/login' target='_parent'>
|
||||
<span>Login</span>
|
||||
<span class='login-img'></span>
|
||||
</a>
|
||||
</div>";
|
||||
}?>
|
||||
<?php if ($this->displayLoginButton): ?>
|
||||
<div class='login-btn'>
|
||||
<a href='/login' target='_parent'>
|
||||
<span><?php echo _('Login'); ?></span>
|
||||
<span class='login-img'></span>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div id="tab-1" class="schedule tab_content current">
|
||||
<iframe onLoad="autoResize('schedule_iframe');" id="schedule_iframe" height="300px" scrolling="yes" frameborder="0" src=<?php echo $this->stationUrl."embed/weekly-program?style=premium"?>></iframe>
|
||||
|
|
Loading…
Reference in New Issue