Đang chuẩn bị liên kết để tải về tài liệu:
Mac OS X Programming phần 8
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Chọn Hiển thị thông tin từ trình đơn dự án. 3. Bấm vào nội địa hóa - nền tảng danh sách thả xuống và nhấn Add LocalizedVariant. 4. Nhập tên của miền địa phương mới (như Đức) trong bảng tính xuất hiện.5. Nhấp vào nút OK để tạo ra các tập tin mới. Dự án Builder tạo ra một file Localizable.strings mới với tên thích hợp | 2. Choose Show Info from the Project menu. 3. Click the Localization Platforms drop-down list and click Add LocalizedVariant. 4. Enter the name of the new locale such as German in the sheet that appears. 5. Click the OK button to create the new file. Project Builder creates a new Localizable.strings file with the appropriate name and adds it to the Localizable.strings group. The new Localizable.strings file will hold the same key-value pairs found in the original English version of the file. It s up to you or to the translator you ve hired to make the necessary translations. When doing so don t translate the keys. Recall that the key is used in your source code and you don t want to have to alter your source code to handle each language. The key serves only as a means for your program to locate a particular string in the Localizable.strings file. The key itself is never displayed by your application so it doesn t need to be translated. Figure 8.10 shows the translation from English to German of the one string from the Localizable.strings file pictured back in Figure 8.7. Note that both keys have the same value Quote appears as the key in both cases. Figure 8.10. The translated string from a project s Localizable.strings file. Note The AltaVista search site http www.altavista.com includes a link to their language translation page http world.altavista.com . Here you type or paste a word or words into a text box choose a translation such as English to German from a menu and click the Translate button. Your text is quickly translated and the resulting translation is displayed above the original text. I ve included this note to let you know about this interesting quick and dirty means of translating text. I ve also included this note to warn you that I don t know German and that I used this AltaVista method to translate the Dylan Thomas quote used in this chapter from English to German. It s unlikely that AltaVista s web page can compete with a real live professional .