Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
7e16837b
Commit
7e16837b
authored
Apr 18, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #2592: added info on how to translate framework messages at application level
parent
ab218add
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
i18n.md
docs/guide/i18n.md
+22
-0
No files found.
docs/guide/i18n.md
View file @
7e16837b
...
@@ -393,6 +393,28 @@ Instead of using `fileMap` you can simply use convention of category mapping to
...
@@ -393,6 +393,28 @@ Instead of using `fileMap` you can simply use convention of category mapping to
> **Note**: For widgets you also can use i18n views, same rules as for controllers are applied to them too.
> **Note**: For widgets you also can use i18n views, same rules as for controllers are applied to them too.
### Translating framework messages
Sometimes you want to correct default framework message translation for your application. In order to do so configure
`i18n`
component like the following:
```
php
'components'
=>
[
'i18n'
=>
[
'translations'
=>
[
'yii'
=>
[
'class'
=>
'yii\i18n\PhpMessageSource'
,
'sourceLanguage'
=>
'en'
,
'basePath'
=>
'/path/to/my/message/files'
],
],
],
],
```
Now you can place your adjusted translations to
`/path/to/my/message/files`
.
Views
Views
-----
-----
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment