Jump to content
  • 0

Language switcher problem


kemeris

Question

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

 

 

 

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...