TAILIEUCHUNG - PHP Programming with PEARXML, Data, Dates, Web Services, and Web APIs - Part 10

Thêm một tập tin ngôn ngữ Để thêm một tập tin ngôn ngữ, các lớp học lái xe cung cấp các phương pháp addTranslationFile () và addCompiledTranslationFile (). Phương pháp đầu tiên cho phép bạn thêm một tập tin bản dịch có chứa dữ liệu XML, thứ hai dự kiến một tập tin với dữ liệu tuần tự. Phương pháp thứ hai hoạt động nhanh hơn rất nhiều bởi vì nó không cần phải | Chapter 5 properties property id type static property property id since 4th century property properties holiday There are no predefined values you should use as ID this is completely up to you. You can store any information you desire. You could use the properties to state if a holiday occurs statically you could provide a detailed description etc. There are two ways to access the property information for a holiday. You can use Date_Holidays_Holiday getProperties if you have a holiday object or the getHolidayProperties method of a Date_Holidays_Driver object. It expects the internal holiday name and the locale identifier as arguments. Adding a Language File To add a language file driver classes provide the methods addTranslationFile and addCompiledTranslationFile . The first method allows you to add a translation file containing XML data the second expects a file with serialized data. The second method works a lot faster because it does not need to parse the XML anymore. Both methods expect two arguments the absolute path to of the file and the locale of the translations contained by the file respectively. driver Date_Holidays factory Christian 2005 file var lib pear data Date_Holidays lang Christian driver- addTranslationFile file fr_FR After adding translations this way a driver will be able to provide localized information. Compiled language files use the .ser file extension and reside in the same directory as the normal XML language files. You can even build your own language files and put them into whatever directory you like. If they are valid and Date_Holidays has the necessary rights to access them it will be able to use them. To compile your custom XML language files you can use the pear-dh-compile-translationfile CLI script that comes with Date_ Holidays. It expects the name of the file to be converted it can also handle multiple filenames and writes the compiled data to a file using the same base name and the .ser file extension. You can type .

TỪ KHÓA LIÊN QUAN
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.