Jump to content
  • 0

Hide the language option from client area


Question

Posted

Most of my clients use the default language , I have a few that use another language and I want to manually set them up with it

without putting the language choosing option globally

 

Is that possible?

3 answers to this question

Recommended Posts

  • 0
Posted

Just remove the code from the structure.pdt /app/views/client/bootstrap/structure.pdt

look for:

 elseif ($this->Html->ifSet($show_language) && $this->Html->ifSet($languages) && count($languages) > 1) {
                ?>
                <div class="top-nav pull-right">
                    <?php
                    $this->Form->create($this->client_uri . 'main/setlanguage/', ['id' => 'language_selector']);
                    $this->Form->fieldHidden('redirect_uri', $this->Html->ifSet($request_uri));
                    $this->Form->fieldHidden('language_code', Configure::get('Blesta.language'), ['id' => 'language_code']);
                    $this->Form->end();
                    ?>
                    <ul>
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php $this->Html->_($languages[Configure::get('Blesta.language')])?> <b class="caret"></b></a>
                            <ul class="dropdown-menu dropdown-menu-right" id="language_switcher">
                                <?php
                                foreach ($languages as $code => $language) {
                                ?>
                                <li class="language_code" language_code="<?php echo $this->Html->safe($code);?>"><a href="#"><?php echo $this->Html->safe($language);?></a></li>
                                <?php
                                }
                                ?>
                            </ul>
                        </li>
                    </ul>
                </div>
                <?php
                }
                ?>

 

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...