This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Mathilde Escher Stiftung
Mathilde Escher Stiftung

Hello! I have the rainlab translate and the translate extended plugin installed. I switch my languages like this:

<div class="main-nav__language-switch-container active-language-{{ activeLocale }}">
        <ul class="main-nav__language-switch-list">
            <li class="main-nav__language-switch-item main-nav__language-switch-item-fr">
                <a class="main-nav__language-switch-link" href="#" data-request="onSwitchLocale" data-request-data="locale: 'fr'">F</a>
            </li>
            <li class="main-nav__language-switch-item main-nav__language-switch-item-de">
                <a class="main-nav__language-switch-link" href="#" data-request="onSwitchLocale" data-request-data="locale: 'de'">D</a>
            </li>
        </ul>
</div>

I have in my default layout the language component connected, with forceUrl:

[localePicker]
forceUrl = 1

I have two languages: German and French and I translated the french URL in the editor in the translate settings. When I go now to e.g.:

/de/ueber-uns

it works all fine. Then I click on the French language link, then it goes to:

/fr/a-propos-de-nous

all fine. But when I then go back to German, the URL looks like following and shows a 404:

/de/a-propos-de-nous

So the language in the URL is changed properly, but the page URL doesn't change.

I made now a workaround, by adding another language (English) which I set as standard. Now I'm able to translate both the German and the French URL and it seems to work.

Is there any better way to do this or did I miss something?

primci
primci

I’m dealing with that problem, too.

daftspunky
daftspunky

Unfortunately, this is a design limitation of the plugin itself. The translated URLs only apply to the selected locale and it is not smart enough to redirect based on the URL alone.

We are working on a solution to this in the next design of the translation features.

Mathilde Escher Stiftung
Mathilde Escher Stiftung

Thanks for the answer daftspunk! Could you make an estimation, when a new version of the plugin will come out, which is fixing this problem?

We would like to put a customer website online soon and the customer is already waiting ;)

Mathilde Escher Stiftung
Mathilde Escher Stiftung

I updated now my october installation to 2.1.1 and it works now. Thank you very much for fixing this!

daftspunky
daftspunky

Oh! Great. It must have been a bug then

1-6 of 6

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.