Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 0b6619f

Browse files
brtriverkriswallsmith
authored andcommitted
[gentle-introdcution][en] fixed the List number in Chapter 13. L419
1 parent 584c23a commit 0b6619f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gentle-introduction/en/13-I18n-and-L10n.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ Listing 13-16 - Translating Sentences That Contain Code
416416

417417
In this example, the token is `%1%`, but it can be anything, since the replacement function used by the translation helper is `strtr()`.
418418

419-
One of the common problems with translation is the use of the plural form. According to the number of results, the text changes but not in the same way according to the language. For instance, the last sentence in Listing 13-15 is not correct if `count_logged()` returns 0 or 1. You could do a test on the return value of this function and choose which sentence to use accordingly, but that would represent a lot of code. Additionally, different languages have different grammar rules, and the declension rules of plural can be quite complex. As this problem is very common, symfony provides a helper to deal with it, called `format_number_choice()`. Listing 13-17 demonstrates how to use this helper.
419+
One of the common problems with translation is the use of the plural form. According to the number of results, the text changes but not in the same way according to the language. For instance, the last sentence in Listing 13-16 is not correct if `count_logged()` returns 0 or 1. You could do a test on the return value of this function and choose which sentence to use accordingly, but that would represent a lot of code. Additionally, different languages have different grammar rules, and the declension rules of plural can be quite complex. As this problem is very common, symfony provides a helper to deal with it, called `format_number_choice()`. Listing 13-17 demonstrates how to use this helper.
420420

421421
Listing 13-17 - Translating Sentences Depending on the Value of Parameters
422422

0 commit comments

Comments
 (0)