Skip to content

Commit bb59816

Browse files
author
Phil Sturgeon
committed
Merge pull request chriskacerguis#183 from burakerdem/master
Fixed sample code at multilingual support section.
2 parents af239ad + ba40e83 commit bb59816

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,19 @@ If you don't specify a response code, and the data you respond with `== FALSE` (
8383

8484
## Multilingual Support
8585

86-
If your application uses language files to support multiple locales, `REST_Controller` will automatically parse the HTTP `Accept-Language` header and provide the language(s) in your actions. This information can be found in the `$this->request->lang` object:
86+
If your application uses language files to support multiple locales, `REST_Controller` will automatically parse the HTTP `Accept-Language` header and provide the language(s) in your actions. This information can be found in the `$this->response->lang` object:
8787

8888
public function __construct()
8989
{
9090
parent::__construct();
9191

92-
if (is_array($this->request->lang))
92+
if (is_array($this->response->lang))
9393
{
94-
$this->load->language('application', $this->request->lang[0]);
94+
$this->load->language('application', $this->response->lang[0]);
9595
}
9696
else
9797
{
98-
$this->load->language('application', $this->request->lang);
98+
$this->load->language('application', $this->response->lang);
9999
}
100100
}
101101

@@ -220,4 +220,4 @@ features for this as I no longer require it, but I will continue to maintain pul
220220
fix issues as and when they are reported (within a week or two).
221221

222222
Pull Requests are the best way to fix bugs or add features. I know loads of you use this, so please
223-
contribute if you have improvements to be made and I'll keep releasing versions over time.
223+
contribute if you have improvements to be made and I'll keep releasing versions over time.

0 commit comments

Comments
 (0)