Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use this.Maybe some issue. #39

Open
Mosquito1123 opened this issue Jun 14, 2022 · 1 comment
Open

How to use this.Maybe some issue. #39

Mosquito1123 opened this issue Jun 14, 2022 · 1 comment

Comments

@Mosquito1123
Copy link

/// number of songs plural
String numberOfSongsAvailable(int count) => Intl.plural(count,
zero: 'No songs found.',
one: 'One song found.',
two: '$count songs found.',
few: '$count songs found.',
other: '$count song found.',
many: '$count songs found.',
name: 'numberOfSongsAvailable',
args: [count],
desc: 'number of songs plural');

/// currency dolars
String amountDollars(int count) => Intl.plural(count,
one: '$count Canadian dollar',
other: '$count Canadian dollars',
name: 'amountDollars',
args: [count],
desc: 'currency dolars');

@Mosquito1123
Copy link
Author

"""Intl.defaultLocale = "pl";
await initializeMessages(Intl.defaultLocale ?? "pl");

final l10n = L10n();

print(l10n.title);
print(l10n.login);
print(l10n.singleArgument('arg'));
print(l10n.twoArguments('arg1', 'arg2'));

// plurals
print(l10n.numberOfSongsAvailable(0));
print(l10n.numberOfSongsAvailable(1));
print(l10n.numberOfSongsAvailable(2));
print(l10n.numberOfSongsAvailable(5));
print(l10n.amountDollars(9));""" Plurals has no output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant