Development

/plugins/gbI18nRoutePlugin/README

You must first sign up to be able to contribute.

root/plugins/gbI18nRoutePlugin/README

Revision 30367, 1.5 kB (checked in by Philippe Gamache, 3 years ago)

clean up

Line 
1 # gbI18nRoutePlugin plugin
2
3 ## Overview
4
5 The `gbI18nRoutePlugin` is a symfony plugin that provides internationalization
6 in the URL.
7
8 It give you the possibility to generate URL based on the user language and on
9 the request route the URL to the right module/action with the correct language.
10
11 ## Installation
12
13 1.Download and install the plugin
14
15 1.1 Using the Symfony plugin installation task:
16
17     ./symfony plugin:install gbI18nRoutePlugin --stability=beta
18
19 1.2 Using the svn version
20
21     cd plugins
22     svn co http://svn.symfony-project.com/plugins/gbI18nRoutePlugin
23
24 ## Configuration
25
26 1.Enable the plugin into your ProjectConfiguration
27
28 Edit your application *config/ProjectConfiguration.class.php* to enable the gbI18nRoute plugin, and add the line below in the setup function
29
30     $this->enablePlugins('gbI18nRoutePlugin');
31
32 2.Edit your application *routing.yml* to use the gbI18nRoute on the route you would like i18n
33
34 Example:
35
36     test:
37       class: gbI18nRoute
38       url:
39         en: /home
40         fr: /acceuil
41       param: { module: home, action: index }
42
43 3.Edit your application *app.yml* to insure you have the lines bellow under the *.settings:* :
44
45     all:
46       .settigns:
47         culture_supported_list: [fr, en]
48
49 ## Test it!
50
51     http://www.example.org/home
52
53 Will give you the *en* page of your module/action
54
55     http://www.example.org/acceuil
56
57 Will give you the *fr* page of your module/action
58
59 ## TODO
60
61 * Filter documentation
62 * More internal documentation
63 * By Domains management
Note: See TracBrowser for help on using the browser.