The Slim Framework support forum has moved to http://discourse.slimframework.com. This Tender forum is no longer maintained or monitored.

Multilingual web application using slim and twig

soumazize's Avatar

soumazize

10 Jun, 2015 08:22 AM

Hey everyone,

i need to create a multilingual website using slim+twig and i want my routes to look like this : htttp://www.example.com/en/hello, i have used the function gettext and the extension i18n to translate templates and it works all i need to know know is how i can communicate the selected language from url to twig and how can i switch languages using a select box for example?

Any help ?

Thank you

  1. 1 Posted by Qiniso on 10 Jun, 2015 07:24 PM

    Qiniso's Avatar
  2. 2 Posted by soumazize on 10 Jun, 2015 08:06 PM

    soumazize's Avatar

    Thank's for replying, i've tried to apply his solution but it's not working !

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac