You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The keys of `languages` array are the language prefixes you use in your URL.
106
102
107
-
To ensure that the `lang` router param is available, you must add this middleware *after* adding CakePHP's default routing middleware (i.e. after `->add(new RoutingMiddleware($this))`).
103
+
To ensure that the `lang` router param is available, you must add this middleware
104
+
*after* adding CakePHP's default routing middleware (i.e. after `->add(new RoutingMiddleware($this))`).
108
105
109
106
The middleware does basically two things:
110
107
@@ -116,7 +113,7 @@ The middleware does basically two things:
116
113
you must connect a route for `/` to a controller action. That controller action
117
114
will never be actually called as the middleware will intercept and redirect
118
115
the request.
119
-
116
+
120
117
For e.g. `$routes->connect('/', ['controller' => 'Foo']);`
121
118
122
119
2. When accesing any URL with language prefix it set's the app's locale based
@@ -154,12 +151,12 @@ I18n::config('default', function ($domain, $locale) {
154
151
});
155
152
```
156
153
157
-
You can use `ADmad/I18n.I18n` shell to extract the translation message from your
154
+
You can use `admad/i18n extract` command to extract the translation message from your
158
155
code files and populate the translations table. Updating the db records with
159
156
translations for each language is upto you.
160
157
161
158
```
162
-
bin/cake ADmad/I18n.i18n extract
159
+
bin/cake admad/i18n extract
163
160
```
164
161
165
162
Now you can use the translation funtions like `__()` etc. as you normally would.
@@ -172,7 +169,7 @@ In your `AppView::initialize()` configure the `FormHelper` to use `TimezoneWidge
0 commit comments