-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to keep the $language variable between requests? #19
Comments
Hey Timo,
In version 1 you had to take care of your url-routing yourself, version 2 integrates the above-mentioned way of setting the language as url-param automatically via htaccess-rules. So if you don't care about translated page-handles version 2 will do everything you need out of the box – It's mostly finished and I'm already using it on several live websites, I just haven't released it yet due to some missing parts in the documentation. I hope to give it the last polish needed before the year ends but I'm not sure if I'll really find the time – documentation always is the hardest part ;) I strongly recommend switching to version 2 and following the already finished chapters of the documentation. |
If you do need translated page-handles then it's a different story… I usually care about fully translated urls and therefore need a solution to translate page-names/handles also. But as most of my projects consist of less than 20 symphony-pages I currently combine multilingual 2.0 with jens scherbl's routing extension and a custom datasource that contains all multilingual page names (for frontend/navigation-stuff). That works really well, but I wouldn't want to set this up for 600 pages ;) I also already combined multilingual 2.0 with page_lhandles in one project, but that means installing all these multilingual-extension-dependencies ( languages, frontend-localisation, etc.) just to get the pages translated. Not a very clean approach and my aim with multilingual 2.0 was to have an out-of-the-box-multilingual-solution that doesn't need a whole couple of extensions to get things running. Translating pages/handles is the missing link – I'm aware of that and hope to find a good solution in the future. But til then this part of a multilingual website has to get solved otherwise… |
To demonstrate how this looks like – this is an example of my routes.xml:
And this is my pages.xml that I include as a custom datsource:
If you don't have too many pages this is a really clean setup in my eyes! |
Thanks, everything works now! I didn't know version 2.0 was production ready. But it seems it is. The routing and everything works as expected and it was very easy to set up! Thankfully, I don't need localized page handles for now. Thanks for developing this extension, will probably use it on a number of projects. |
Hi,
I am using the
1.X
release and it works really well for me, except that I find it difficult to keep the$language
variable between requests. What is the best way to keep it? It would be nice to have URLs like:I managed to set it up using the URL router extension, however it wants me to define a route for every single page I've got. With this project that means setting up more than 600 routes.
What's the best way to deal with this?
The text was updated successfully, but these errors were encountered: