My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
Yii Documentation Project
=========================

This project aims to translate Yii core messages, system views
and various documentation into different languages.

The directory structure is shown at the end of this file, where
<lang> stands for the language code for a particular language
(e.g. 'de' for German, 'zh_cn' for simplified Chinese).

File is the basic unit of translations. For each file to be
translated, you should create a new file with the same name and
save it under an appropriate directory. For example, in order to
translate the "database.ar.txt" file of the definitive guide into
German, you should save the translated file as "guide/de/database.ar.txt".

**************************************************************
MAKE SURE YOU USE UTF-8 ENCODING WHEN SAVING YOUR TRANSLATION.
**************************************************************

Check in frequently instead of waiting till you finish all
translations. As there may be several people translating in
the same language, checking in frequently may help reduce
duplicated work. It also gives other people chance to review
your translation ealier.

If you participated in translating the Guide or the Blog tutorial,
you may leave your name in the "index.txt" page,
saying "translated by Your Name".

We will include the latest translations into every release of Yii,
and also display them online.

Thank you for your support and contribution to Yii!

Ensure UTF-8 encoding
---------------------

It's very important that the translations are saved with a correct UTF-8 encoding.
Especially wrongly encoded view files can cause massive trouble to developers and
end-users (ie "headers already sent" error). There's a special console command
that will help you to ensure that your translations are correctly encoded.

This command will list every translation file which appears to have an incorrect
UTF-8 encoding.

protected/yiic utf8 checkencoding

If one of your translations is in there, please open it and save it with UTF-8 encoding.
You may try Google or ask in the Forum on how to configure your editor so that the correct
encoding gets applied.

This command will list every translation file which contains a so called UTF-8 BOM header.

protected/yiic utf8 checkbom

Simply check if one of your translations is in there. If that's the case you can use the
following command to remove the UTF-8 BOM header.

protected/yiic utf8 fixbom /path/to/translation/file

When you're done with your files, simply re-run "utf8 checkbom" one more time to verify all
of your affected translations are indeed fixed.

Testing Translations
--------------------

You can use the included application to test your translations online.
To access the application, the whole checked out folder should be placed
under a Web-accessible folder. For example, `yiidoc`.
And you can then access the Guide via:

http://hostname/path/to/yiidoc/index.php?r=guide

or the Blog tutorial via:

http://hostname/path/to/yiidoc/index.php?r=blog


Translate Blockquote in the Guide and the Blog Tutorial
-------------------------------------------------------

The Guide and the Blog contains blockquotes that start with tokens
like "> Note:", "> Tip: ", and so on. Do not translate these tokens.
Instead, append the translation of the token word and use "|" as
the separator. For example,

> Note|translation for 'note': ....

> Tip|translation for 'tip': ......


How to Synchronize the Guide and the Blog
-----------------------------------------

In order to keep track of the changes made to the source guide and blog pages,
for every translated page, we should append the source revision number
by copying the following line from the source page:

<div class="revision">$Id: basics.application.txt 626 ... $</div>

A source page is updated, it will have a different revision number,
and we can use this number to detect if the corresponding translation
is up-to-date or not. We can then use SVN's tool to compare two revisions,
find out the changes to the source page, and synchronize the translation
accordingly.

NOTE: we should not set "id" as SVN keyword for the translated pages.
Otherwise, the above revision reference will be automatically modified by SVN.

We have developed a command line tool to simplify the above task.
Under the yiidoc directory and in a command window, run the following command:

protected/yiic syncguide de

protected/yiic syncblog de

The command will check if translations in German are up-to-date.


How to Synchronize Messages
---------------------------

We have a tool to help synchronize changes made to Yii core messages
and requirement checker messages. Check out an SVN copy of Yii
framework. On command line under the "build" directory, run
the following command:

build message ../framework/messages/config.php

This will extract original messages from Yii framework and merge
them with the translations under the "messages" directory. You can
now check the merged file to see if there is any change since you
translate the messages last time. Similar procedure applies to
the requirement checker messages, which can be synchronized using
the following command:

build message ../requirements/messages/config.php



Directory Structure
-------------------

blog/ the blog tutorial
source/ the original blog text (read-only)
<lang>/ translation of the blog in a language

guide/ the definitive guide
source/ the original guide text (read-only)
<lang>/ translation of the guide in a language

messages/ the Yii core messages
<lang>/ translation of the messages in a language

views/
source/ the original system view files (read-only)
<lang>/ translation of the views in a language

requirements/
messages/ the messages for requirement checker
<lang>/ translation of the messages in a language
views/ the view files for requirement checker
source/ the original view files (read-only)
<lang>/ translation of the views in a language

framework/ the Yii framework directory (read-only)


The following directories and folders are for the included
Web application. Do not translate them.
css/
protected/
index.php

Change log

r1790 by keyboard.idol on Nov 22, 2010   Diff
Added Utf8Command
Go to: 
Project members, sign in to write a code review

Older revisions

r1533 by alexander.makarow on Jul 28, 2010   Diff
Pointed framework to trunk, used https
for all externals. Changed year in
test app layout and did some changes
to readme.
r1005 by haertl.mike on Jun 7, 2009   Diff
Fixed typos
r969 by qiang.xue on May 13, 2009   Diff
prepare for translating blog.
All revisions of this file

File info

Size: 6211 bytes, 174 lines
Powered by Google Project Hosting