You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For other countries that have a "Labour Day", using the British/Canadian/Australian/etc spelling makes sense.
However, in the USA, the spelling should be "Labor Day".
I would make a PR for this, except that I'm not sure what is the best way to handle it:
I would put it in Yasumi\Provider\USA since I think Americans should see the other countries' version with a "u" and other countries should see the American holiday without a "u", but that requires also duplicating data/translations/labourDay.php as data/translations/laborDay.php.
I thought of just adding a line 'en_US' => 'Labor Day' to the translation file, but that would make other countries' Labour Days also spelled the American way when viewed by an American, and that's not what we want.
The text was updated successfully, but these errors were encountered:
@kohenkatz Thank you for noticing this. The way to handle this by Yasumi is to add translations of a holiday in the respective file (in this case labourDay.php (Not that the filename just represents the internal name used by Yasumi and not it's translations)
For displaying the correct spelling depending on the user, you can pass a locale parameter with the getName() method. This accepts an array of locales to be searched for translations. E.g if ['en_US', 'de_AT'] is provided, the following lookup priority is used: en_US → en → de_AT → de.
So. simply adding the en_US translation to the labourDay file is sufficient to allow for any possible situation :)
For other countries that have a "Labour Day", using the British/Canadian/Australian/etc spelling makes sense.
However, in the USA, the spelling should be "Labor Day".
I would make a PR for this, except that I'm not sure what is the best way to handle it:
Yasumi\Provider\USA
since I think Americans should see the other countries' version with a "u" and other countries should see the American holiday without a "u", but that requires also duplicatingdata/translations/labourDay.php
asdata/translations/laborDay.php
.'en_US' => 'Labor Day'
to the translation file, but that would make other countries' Labour Days also spelled the American way when viewed by an American, and that's not what we want.The text was updated successfully, but these errors were encountered: