TAILIEUCHUNG - Hướng dẫn tạo themes cho wordpress part 24

Thêm một bình luận vào tập tin readme của chủ đề của bạn về sự sẵn có của tập tin PO, và chỉ rõ rằng chủ đề của bạn là chuẩn bị cho dịch thuật và nội địa hóa. Bạn cũng có thể muốn thêm một tập tin readme thêm trong thư mục bản dịch của bạn mô tả mục đích của tập tin PO. | Chapter 11 Check your po file. It should have each text string block formatted like the following example which shows the text string Dashboard from the administration panel along with a comment block directly above it that describes where the text string is located within the template wp-admin 10 msgid Dashboard msgstr Add a comment to the readme file of your theme about the availability of the po file and specifying that your theme is prepared for translation and localization. You may also want to add an additional readme file in your translation folder that describes the purpose of the po file. Now that the template has been localized you will need to add a tag to either your file or file so that any translated text will be loaded if desired by the user. Open up or create a file and add the following code contained within PHP tags where themename is the name of your theme folder on your server Translate if applicable load_theme_textdomain themename As an extra step you can also create your own localization files. Open your po file and augment the msgstr for each item so that it now contains the translated text. Following is an example of the text string Dashboard translated to Spanish wp-admin 10 msgid Dashboard msgstr Tablero de instrumentos Save the file with the extension .po within your translation folder using the language abbreviation as the file name. For example if your .po file is in Spanish it would usually be called where the lowercase text represents the dialect or regional language and the uppercase text represents the core language abbreviation. The .po file now needs to be formatted as an .mo Machine Object file in order for the text to be properly read by the server side GetText translation utility used by WordPress. You can download the free editor POEdit from http so that you can make any additional translation changes and then save the file in .mo format. Next you

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.