Home Home Home
Home
08/02/2012    05:20 GMT
735 người dùng đang trực tuyến (61 đã đăng ký)
5.211 công ty dịch
149.378 người dùng đã đăng ký
Trang chủCafé của TôiCông tyPhiên dịch tự doCông việcCộng đồngTrợ giúp
Thành viên đăng nhập

Tên đăng nhập

Mật khẩu
Bấm để được trợ giúp
Ngôn ngữ trang
VIVietnamese – Tiếng Việt

Thư viện hướng dẫn

In bài viết

QUYET Ngo   

How to Translate PHP Language File


Bởi QUYET Ngo. Được gửi vào 14 Tháng Bảy 2009

Về tác giả: Ngo Tien Quyet is a freelance translator with 6 years experience in localization and translation, specializing in technical, IT and medical topics. He lives in Viet Nam and translates from English into Vietnamese.



There are variety of .PHP language files, but they have the same feature: the code and the text are separated by symbols. Therefore, we can extract the translatable text out and translate with CATs.

This short article shows how to translate the translatable text in a Joomla PHP language file.

Inside the Joomla PHP language file you will see:
….

DEFINE("_LANGUAGE","en");
DEFINE("_NOT_AUTH","You are not authorised to view this resource.");
DEFINE("_DO_LOGIN","You need to login.");
DEFINE("_MAIN_INCLUDES_HOME","Home");
DEFINE("_MAIN_INCLUDES_SEARCH","Search");
DEFINE("_MAIN_INCLUDES_NEW","New");
DEFINE("_MAIN_INCLUDES_TELEPHONE","Telephone:");
DEFINE("_MAIN_INCLUDES_CLOSE","Close Window");
DEFINE("_MAIN_INCLUDES_PRINT","Print Screen");
DEFINE("_MAIN_INCLUDES_BACK","Go Back");
DEFINE("_MAIN_INCLUDES_POSTMAIL","Thank you - you can now close this window.");
DEFINE("_MAIN_INCLUDES_RSS","Get the latest RSS feed listings");

…and here are my steps:

TO EXTRACT

  1. Select all text in your PHP file, copy & paste them into MS Excel (starting from the Column A, Row 1).
  2. Select all cells in the Column A, click the Data menu, click Text to Column, select the Delimited check box, and then click Next.
  3. In the Delimiters group box, click to clear Tab, Semicolon, Comma, and Space check boxes, select Other check box, type (") without parentheses in the accompanying text box, and then click Finish.
  4. You should now have five columns: A, B, C, D, E. The text in the Column D is what you need to translate.
  5. Select all cells in the Column D, copy & paste into a new MS Word or Excel file for translating.

TO CONCATENATE

  1. Select all translated text, copy & paste into all cells in the Column D.
  2. Insert a new column between A and B, between C and D, between E and F, between G and H.
  3. Enter (") without parentheses into all cells in four new columns B, D, F, H, which you got after insertions.
  4. Select the cell J1.
  5. For Excel 2003:
    On the Insert menu, click Function, choose Text category, double-click the CONCATENATE function.
    For Excel 2007:
    On the Formulas tab, in the Function Library group, click Text, select the CONCATENATE function.
  6. The Function Arguments dialog box appears, enter:
    A1 for Text1 box,
    B1 for Text2 box,
    C1 for Text3 box,
    D1 for Text4 box,
    E1 for Text5 box,
    F1 for Text6 box,
    G1 for Text7 box,
    H1 for Text8 box,
    I1 for Text9 box, and then click OK
  7. All PHP codes and your translation are now concatenated in the cell J1. Let’s copy the function and paste it into other cells in the Column J.
  8. Select all cells in the Column J, copy & paste over text on your PHP file. Now you got the final file for delivery.
Giới thiệu bài viết này:  del.icio.us facebook


    
Bài viết mới nhất trên diễn đàn:
RE: Internship of any kind của Maxi Schwarz-Bastami trong diễn đàn Jobs, Outsourcers and Payment.

Khảo sát mới nhất:
Bỏ phiếu hoặc... tạo cuộc khảo sát ý kiến của bạn.
Khảo sát khác
TranslatorsCafé.com

Ngôn ngữ trang English | Spanish – Español | French – Français | German – Deutsch | Italian – Italiano | Ngôn ngữ khác... | Bản đồ vWebsite

Bản quyền © ANVICA Software Development 2002—2012. Bảo lưu toàn quyền.
Chính sách về Quyền riêng tư. Điều Kiện và Quy định Sử dụng. Khi sử dụng có nghĩa là bạn đã đồng ý.
Gửi nhận xét và góp ý cho Quản trị trang TranslatorsCafe.com
Danh bạ Phiên dịch, Biên dịch và Công ty dịch.
Xin lưu ý quá trình bản địa hóa trang TranslatorsCafe.com chưa hoàn tất.
Trong trường hợp có sự sai khác giữa bản dịch và bản gốc tiếng Anh thì bản tiếng Anh sẽ được sử dụng làm căn cứ.