summaryrefslogtreecommitdiff
path: root/README.rst
blob: e90fe51f97523556c7f8f180e9f150c7c3e7eb6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
``zope.i18nmessageid``
======================

.. image:: https://img.shields.io/pypi/v/zope.i18nmessageid.svg
    :target: https://pypi.python.org/pypi/zope.i18nmessageid/
    :alt: Latest Version

.. image:: https://travis-ci.com/zopefoundation/zope.i18nmessageid.svg?branch=master
        :target: https://travis-ci.com/zopefoundation/zope.i18nmessageid

.. image:: https://readthedocs.org/projects/zopei18nmessageid/badge/?version=latest
        :target: http://zopei18nmessageid.readthedocs.org/en/latest/
        :alt: Documentation Status

To translate any text, we must be able to discover the source domain
of the text.  A source domain is an identifier that identifies a
project that produces program source strings.  Source strings occur as
literals in python programs, text in templates, and some text in XML
data.  The project implies a source language and an application
context.

We can think of a source domain as a collection of messages and
associated translation strings.

We often need to create unicode strings that will be displayed by
separate views.  The view cannot translate the string without knowing
its source domain.  A string or unicode literal carries no domain
information, therefore we use messages.  Messages are unicode strings
which carry a translation source domain and possibly a default
translation.  They are created by a message factory. The message
factory is created by calling ``MessageFactory`` with the source
domain.

This package provides facilities for *declaring* such messages within
program source text;  translation of the messages is the responsiblitiy
of the 'zope.i18n' package.

Please see http://docs.zope.org/zope.i18nmessageid/ for the documentation.