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

Return incorrect ordinals numbers to fr_CA #344

Open
dramoslance opened this issue Jun 4, 2021 · 1 comment
Open

Return incorrect ordinals numbers to fr_CA #344

dramoslance opened this issue Jun 4, 2021 · 1 comment

Comments

@dramoslance
Copy link

Is it possible to include fr_CA to numbers in the following format: 12e ??

@kylekatarnls
Copy link
Contributor

Numbers of what? Because if you mean the day number, then in French (including fr_CA) day number should only have ordinal for the 1 => 1er. All other days does not have ordinal.

The reason is simple : you don't say "Mardi second Mars", you say: "Mardi deux Mars", no ordinal form.

So it should not be implemented in the regular translation. It would be grammatically wrong.

If you're still really sure you want to override this for you app, you can use:

\Carbon\Translator::get('fr_CA')->setTranslations([
    'ordinal' => function ($number) {
        return $number.($number === 1 ? 'er' : 'e');
    },
]);

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

2 participants