azuyalabs / yasumi

The easy PHP Library for calculating holidays
https://www.yasumi.dev
Other
1.04k stars 152 forks source link

Add translation in English for German Unity Day #272

Closed snikoletopoulos closed 2 years ago

snikoletopoulos commented 2 years ago

Add translation for German Unity Day in English. Please give me feedback.

c960657 commented 2 years ago

You don't need to specify en_US and en_GB separately. Just specify en – this will work for all English variants.

snikoletopoulos commented 2 years ago

Hello, thank you for your feedback

I tried using 'en' but I couldn't make it work. I noticed that in other translations there are 'en_US' etc. specified separately. Can you direct me where to look to solve this?

stelgenhof commented 2 years ago

@snikoletopoulos Could you share perhaps your code what you are trying to do? I used the following script and works fine using only the en locale.


<?php

declare(strict_types=1);

require 'vendor/autoload.php';

$holidays = Yasumi\Yasumi::create('Germany', 2022);         

$unityDay = $holidays->getHoliday('germanUnityDay');

echo $unityDay->getName(['de']).PHP_EOL;
// prints "Tag der Deutchsen Einheit"     

echo $unityDay->getName().PHP_EOL;
// prints "German Unity Day"
github-actions[bot] commented 2 years ago

Since this pull request has not had any activity within the last 90 days, I have marked it as stale. I will close it if no further activity occurs within the next 10 days.