diff --git a/lang/vi_utf8/docs/coding.html b/lang/vi_utf8/docs/coding.html
index 29b36b4aebd..b5693e6b132 100644
--- a/lang/vi_utf8/docs/coding.html
+++ b/lang/vi_utf8/docs/coding.html
@@ -124,31 +124,31 @@
-
Indenting
- should be consistently 4 spaces. Don't use tabs AT ALL.
+ nên là 4 khoảng trống một cách nhất quán. Đừng dùng các tab.
-
- Variable names should always be easy-to-read, meaningful
- lowercase English words. If you really need more than one word then run them
- together, but keep them short as possible. Use plural names for arrays of
- objects.
-
GOOD: $quiz
- GOOD: $errorstring
- GOOD: $assignments (for an array of objects)
- GOOD: $i (but only in little loops)
+ Các tên biến nên dễ đọc, có ý nghĩa
+ là các từ tiếng Anh thấp. Nếu bạn cần nhiều hơn một từ thì hãy dùng chúng
+ với nhau, nhưng giữ chúng càng ngắn càng tốt. Dùng các tên số nhiều cho các dãy
+ đối tượng.
+ TỐT: $quiz
+ TỐT: $errorstring
+ TỐT: $assignments (for an array of objects)
+ TỐT: $i (but only in little loops)
- BAD: $Quiz
+ TỒI: $Quiz
- BAD: $aReallyLongVariableNameWithoutAGoodReason
- BAD: $error_string
+ TỒI: $aReallyLongVariableNameWithoutAGoodReason
+ TỒI: $error_string
-
- Constants should always be in upper case, and always start
- with the name of the module. They should have words separated by underscores.
+ Các hằng số nên là các chữ hoa, và luôn bắt đầu bằng
+ tên các module. Chúng là các từ được phân cách với nhau bằng dấu gạch chân.
define("FORUM_MODE_FLATOLDEST", 1);
-
- Function names should be simple English lowercase words, and
- start with the name of the module to avoid conflicts between modules. Words
- should be separated by underscores. Parameters should always have sensible
- defaults if possible. Note there is no space between the function name and the
- following (brackets).
+ Tên các hàm nên là các từ tiếng Anh bình thường, và
+ bắt đầu bằng tên module để tránh xung đột với các module. Các từ
+ phải được phân cách bằng dấu gạch chân. Các tham số nên được đặt một cách
+ cẩn thận nếu có thể. Chú ý không có khoảng trống giữa tên hàm và
+ các dấu ngoặc như dưới đây.
function forum_set_display_mode($mode=0)
@@ -167,8 +167,8 @@
}
}
-
- Blocks must always be enclosed in curly braces (even if there
- is only one line). Moodle uses this style:
+ Các khối luôn luôn được đóng bởi các ngoặc nhọn (thậm chí nếu
+ chỉ có một dòng). Moodle sử dụng style dưới đây:
if ($quiz->attempts)
{
@@ -270,43 +270,43 @@
Cấu trúc cơ sở dữ liệu
-
- Every table must have an auto-incrementing id
- field (INT10) as primary index.
+ Mọi bảng phải có một id tự tăng
+ như là một trường (INT10) là index chính.
-
- The main table containing instances of each module must have the same name as
- the module (eg widget) and contain the following minimum
- fields:
+ Bảng chính chứa các instance của mỗi module phải có tên trùng với
+ tên module (ví dụ widget) và chứa tối thiểu các trường sau
+ :
-
id
- - as described above
+ - như mô tả ở trên
-
course
- - the id of the course that each instance belongs to
+ - id của cua học mà mỗi instance thuộc về
-
- name - the full name of each instance of the module
+ name - tên đầy đủ của mỗi instance của module
-
- Other tables associated with a module that contain information about 'things'
- should be named widget_things
- (note the plural).
+ Các bảng khác gắn liền với một module chứa các thông tin về 'things'
+ nên được đặt tên là widget_things
+ (chú ý về số nhiều).
-
- Column names should be simple and short, following the same rules as for
- variable names.
+ Các tên cột phải đơn giản và ngắn gọn, hãy tuân theo các luật giống như
+ tên các biến.
-
- Where possible, columns that contain a reference to the id field of another
- table (eg widget) should be called widgetid.
- (Note that this convention is newish and not followed in some older tables)
+ Khi có thể, các cột chứa một tham chiếu tới trường id của bảng khác
+ (ví dụ widget) nên được gọi là widgetid.
+ (Chú ý rằng các quy ước này mới và không được tuân theo ở một số bảng cũ)
-
- Boolean fields should be implemented as small integer fields (eg INT4)
- containing 0 or 1, to allow for later expansion of values if necessary.
+ Các trường boolean nên được thực thi như là các trường số nguyên nhỏ (eg INT4)
+ chứa 0 hoặc 1, cho phép mở rộng sau này khi cần thiết.
-
- Most tables should have a timemodified field (INT10) which is
- updated with a current timestamp obtained with the PHP time()
- function.
+ Đa số các bảng phải có trường timemodified (INT10) được
+ cập nhật với timestamp hiện thời lấy được thông qua hàm time()
+ của PHP.