These are chat archives for luyadev/luya

6th
Oct 2016
Klaus Mergen
@KlausMergen_twitter
Oct 06 2016 17:07
I have a multilingual site. Default language is de. Now I want that the en url look like this: www.blablabla/onetest and not www.blablabla/en/onetest.
blob
Basil
@nadar
Oct 06 2016 18:32

Not sure what you like to achieve. The multi lingual system requires an identifier to find the language, otherwise a multi lingual pages does not make sense. You could also different domains to force a differte language with the en language prefix.

An example with subdomains you see the hostInfoMapping example: https://luya.io/guide/concept-composition

'hostInfoMapping' => [
                'http://example.com' => ['langShortCode' => 'en'],
                'http://example.de' => ['langShortCode' => 'de'],
            ],
Andrey Svetlichniy
@Emericanec
Oct 06 2016 18:38
He can write it?
'hostInfoMapping' => [
                'http://example.com/en/*' => ['langShortCode' => 'en'],
                'http://example.com/de/*' => ['langShortCode' => 'de'],
            ],
Basil
@nadar
Oct 06 2016 18:39
As far as i understood, he wants to use different languages but without a language identifier in the url - this is not possible, but you can map domains to a language.
Andrey Svetlichniy
@Emericanec
Oct 06 2016 18:41
aaa
mb keep language in session ?
it will be without a language identifier in the url
Basil
@nadar
Oct 06 2016 18:44
Yes - this would be possible. Not a very good idea for search engines
Andrey Svetlichniy
@Emericanec
Oct 06 2016 18:46
yep
Basil
@nadar
Oct 06 2016 18:51
'on beforeRequest' => function ($event) {
      // check get param
     // set/get session data
       $lang = Yii::$app->sesson->get(…);
        $event->sender->composition->setKey('langShortCode', $lang);
 },
but this makes still not much sense :D
Klaus Mergen
@KlausMergen_twitter
Oct 06 2016 20:01
This message was deleted
Hello,
echo  'Hello';
Is it possible of setting a short name for the page name in the admin UI instead of the whole page title
blob