Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[WIP] Bootstrapped the Translation documentation#2545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
wouterj wants to merge13 commits intosymfony:2.0fromwouterj:document_translation
Closed
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
13 commits
Select commitHold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
Fixed things mentioned by the great@xabbuh
  • Loading branch information
@wouterj
wouterj committedJun 6, 2013
commit12af0e880b5df0bb15b7ac4e5ccf16652b8beea5
8 changes: 4 additions & 4 deletionsbook/translation.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -78,9 +78,9 @@ The locale used in translations is the one stored in the user session.
Fallback and Default Locale
~~~~~~~~~~~~~~~~~~~~~~~~~~~

If the locale hasn't been set explicitly in the session, the ``fallback_locale``
configuration parameter willbe used by the ``Translator``. The parameter
defaults to ``en`` (see`Configuration`_).
If the locale hasn't been set, the ``fallback`` configuration parameter will
be used by the ``Translator``. The parameter defaults to ``en`` (see
`Configuration`_).

Alternatively, you can guarantee that a locale is set on the user's session
by defining a ``default_locale`` for the session service:
Expand DownExpand Up@@ -276,7 +276,7 @@ works when you use a placeholder following the ``%var%`` pattern.
.. caution::

The ``%var%`` notation of placeholders is required when translating in
Twig templates.
Twig templates using the tag.

.. tip::

Expand Down
14 changes: 7 additions & 7 deletionscomponents/translation/introduction.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,7 @@ The Translation Component
Installation
------------

You can install the component inmany different ways:
You can install the component in2 different ways:

* Use the official Git repository (https://github.com/symfony/Translation);
* :doc:`Install it via Composer</components/using_components>` (``symfony/translation`` on `Packagist`_).
Expand DownExpand Up@@ -156,10 +156,11 @@ Using Message Domains
As you've seen, message files are organized into the different locales that
they translate. The message files can also be organized further into "domains".

The domain is specific in the fourth argument of the ``addResource()`` method.
The default domain is ``messages``. For example, suppose that, for organization,
translations were split into three different domains: ``messages``, ``admin``
and ``navigation``. The French translation would be loaded like this::
The domain is specified in the fourth argument of the ``addResource()``
method. The default domain is ``messages``. For example, suppose that, for
organization, translations were split into three different domains:
``messages``, ``admin`` and ``navigation``. The French translation would be
loaded like this::

// ...
$translator->addLoader('xliff', new XliffLoader());
Expand All@@ -175,12 +176,11 @@ you must specify the domain as the third argument of ``trans()``::

Symfony2 will now look for the message in the ``admin`` domain of the
specified locale.
can use ``-Inf`` and ``+Inf`` for the infinite.

Usage
-----

Read how to use the Translationcomponents in ":doc:`/components/translation/usage`".
Read how to use the Translationcomponent in ":doc:`/components/translation/usage`".

.. _Packagist: https://packagist.org/packages/symfony/translation
.. _`ISO3166 Alpha-2`: http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes
Expand Down
1 change: 1 addition & 0 deletionscomponents/translation/usage.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -342,6 +342,7 @@ Or numbers between two other numbers:

The left delimiter can be ``[`` (inclusive) or ``]`` (exclusive). The right
delimiter can be ``[`` (exclusive) or ``]`` (inclusive). Beside numbers, you
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

something's missing here, maybe the sentence fragment from above?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Yew, will fix it

can use ``-Inf`` and ``+Inf`` for the infinite.

Forcing the Translator Locale
-----------------------------
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp