Internasionalisasi dan lokalisasiLink to this heading

IkhtisarLink to this heading

The goal of internationalization and localization is to allow a single Web application to offer its content in languages and formats tailored to the audience.

Django has full support for translation of text, formatting of dates, times and numbers, and time zones.

Pada dasarnya, Django melakukan dua hal:

  • It allows developers and template authors to specify which parts of their apps should be translated or formatted for local languages and cultures.

  • It uses these hooks to localize Web apps for particular users according to their preferences.

Obviously, translation depends on the target language, and formatting usually depends on the target country. This information is provided by browsers in the Accept-Language header. However, the time zone isn't readily available.

PenentuanLink to this heading

The words "internationalization" and "localization" often cause confusion; here's a simplified definition:

internasionalisasiLink to this term

Preparing the software for localization. Usually done by developers.

pelokalanLink to this term

Writing the translations and local formats. Usually done by translators.

More details can be found in the W3C Web Internationalization FAQ, the Wikipedia article or the GNU gettext documentation.

Disini adalah beberapa ketentuan lain yang akan membantu kami menangani bahasa umum:

nama lokalLink to this term

A locale name, either a language specification of the form ll or a combined language and country specification of the form ll_CC. Examples: it, de_AT, es, pt_BR. The language part is always in lower case and the country part in upper case. The separator is an underscore.

kode bahasaLink to this term

Mewakili nama dari bahasa. Peramban mengirim nama-nama dari bahasa mereka terima dalam kepala HTTP Accept-Language menggunakan bentuk ini. Contoh: it, de-at, es, pt-br. Kode-kode bahasa umumnya diwakili dalam huruf-kecil, tetapi kepala Accept-Language HTTP adalah kasus-tidak-peka. Pemisahnya adalah sebuah tanda garis.

berkas pesanLink to this term

A message file is a plain-text file, representing a single language, that contains all available translation strings and how they should be represented in the given language. Message files have a .po file extension.

deretan kalimat terjemahanLink to this term

A literal that can be translated.

bentuk berkasLink to this term

A format file is a Python module that defines the data formats for a given locale.