Skip to content

Plural form with default message #140

Open
@7nights

Description

In the example you can use variables with defaultMessage like
intl.get('HELLO', { name }).d(`Hello, ${name}`); // "Hello, Tony". But is there anyway to get defaultMessage to work with locale template like
intl.get('HELLO', { num }).d("You have {num, plural, =0 {no photos.} =1 {one photo.} other {# photos.}}" )" }) . For example, maybe add a parameter to intl.get: intl.get(key, variables, defaultMessage) or you may need to do some refactoring to make it work with current apis.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions