{ "id": "api/common/I18nSelectPipe", "title": "I18nSelectPipe", "contents": "\n\n
\n
\n
\n \n API > @angular/common\n
\n \n
\n \n
\n

I18nSelectPipelink

\n \n \n \n \n \n
\n \n \n\n
\n \n
\n

Generic selector that displays the string that matches the current value.

\n\n

See more...

\n
\n \n \n \n
\n {{ value_expression | i18nSelect : mapping }}\n\n

NgModulelink

\n\n\n\n\n \n

Input valuelink

\n \n \n \n \n \n \n \n \n \n
\n \n value\n string\n

a string to be internationalized.

\n\n
\n \n \n

Parameterslink

\n \n \n \n \n \n \n \n \n \n
\n \n mapping\n object\n

an object that indicates the text that should be displayed\nfor different values of the provided value.

\n\n
\n \n
\n\n\n \n\n \n\n
\n

Descriptionlink

\n

If none of the keys of the mapping match the value, then the content\nof the other key is returned when present, otherwise an empty string is returned.

\n\n

Further information available in the Usage Notes...

\n
\n\n\n \n
\n

Usage noteslink

\n

Examplelink

\n\n@Component(\n {selector: 'i18n-select-pipe', template: `<div>{{gender | i18nSelect: inviteMap}} </div>`})\nexport class I18nSelectPipeComponent {\n gender: string = 'male';\n inviteMap: any = {'male': 'Invite him.', 'female': 'Invite her.', 'other': 'Invite them.'};\n}\n\n\n\n
\n\n\n\n
\n
\n\n\n" }