Jump to content
  • 0

Language switcher problem


Question

Posted

Hi,

I have made a copy of default bootstrap client template and trying to modify it to my needs.

My problem is language switcher on my template does not work.

Once I click language title from homepage, browser redirects me to login page (mywebsite.com/client/login/) instead of changing language. Language switcher does work on default bootstrap template.

I use unmodified language switcher code, all blesta scripts and css files are included in my template.

                <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>

On browser inspector I see form is submitted, with three params:

image.thumb.png.2f2d0afba3d933d7cb8538ebf2310af8.png

Any ideas what could be a problem?

 

Thanks in advance

 

 

 

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...