{VAR_PLURAL, plural, =0 {just now} =1 {one minute ago} other { minutes ago} }{VAR_PLURAL, plural, =0 {à l'instant} =1 {il y a une minute} other {il y a minutes} }
翻译替代表达式
Angular 还会提取备用的 select ICU 表达式作为单独的翻译单元。
gender select 示例
以下示例在组件模板中显示了一个 select ICU 表达式。
The author is {gender, select, male {male} female {female} other {other}}
{VAR_SELECT, select, male {male} female {female} other {other} }{VAR_SELECT, select, male {un homme} female {une femme} other {autre} }
以下示例显示了翻译完的两个翻译单元。
The author is L'auteur est {VAR_SELECT, select, male {male} female {female} other {other} }{VAR_SELECT, select, male {un homme} female {une femme} other {autre} }
{VAR_PLURAL, plural, =0 {just now} =1 {one minute ago} other { minutes ago by {VAR_SELECT, select, male {male} female {female} other {other} }} }{VAR_PLURAL, plural, =0 {à l'instant} =1 {il y a une minute} other {il y a minutes par {VAR_SELECT, select, male {un homme} female {une femme} other {autre} }} }
以下示例会在翻译后显示两个翻译单元。
Updated: Mis à jour: {VAR_PLURAL, plural, =0 {just now} =1 {one minute ago} other { minutes ago by {VAR_SELECT, select, male {male} female {female} other {other} }} }{VAR_PLURAL, plural, =0 {à l'instant} =1 {il y a une minute} other {il y a minutes par {VAR_SELECT, select, male {un homme} female {une femme} other {autre} }} }