mattimaier / bnote

BNote - Open Source Ensemble Management
http://www.bnote.info
GNU General Public License v3.0
23 stars 16 forks source link

Multilanguage / Localization improvement #525

Open encodeuramateur opened 1 year ago

encodeuramateur commented 1 year ago

In order to support French language code must be manually change into following file (see details below). Could you please integrate the possibility to change timezone and language setting (other than translation) into administration module ?

The details :

BNote\src\logic\main.js

Before: => language: "de", After: => language: "fr_FR",

BNote\embed.php

Before: => date_default_timezone_set("Europe/Berlin"); After: => date_default_timezone_set("Europe/Paris"); Before: => setlocale(LC_ALL, 'de_DE'); After: => setlocale(LC_ALL, 'fr_FR');

BNote\main.php

Before: => date_default_timezone_set("Europe/Berlin"); After: => date_default_timezone_set("Europe/Paris"); Before: => setlocale(LC_ALL, 'de_DE'); After: => setlocale(LC_ALL, 'fr_FR');

BNote\src\export\calendar.php

Before: => $timezone = "Europe/Berlin"; After: => $timezone = "Europe/Paris";

Before: => echo "BEGIN:VTIMEZONE\r\n"; echo "TZID:Europe/Berlin\r\n"; echo "TZURL:http://tzurl.org/zoneinfo-outlook/Europe/Berlin\r\n"; echo "X-LIC-LOCATION:Europe/Berlin\r\n"; echo "X-WR-TIMEZONE:Europe/Berlin"; echo "BEGIN:DAYLIGHT\r\n"; echo "TZOFFSETFROM:+0100\r\n"; echo "TZOFFSETTO:+0200\r\n"; echo "TZNAME:CEST\r\n"; echo "DTSTART:19700329T020000\r\n"; echo "RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\n"; echo "END:DAYLIGHT\r\n"; echo "BEGIN:STANDARD\r\n"; echo "TZOFFSETFROM:+0200\r\n"; echo "TZOFFSETTO:+0100\r\n"; echo "TZNAME:CET\r\n"; echo "DTSTART:19701025T030000\r\n"; echo "RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\n"; echo "END:STANDARD\r\n"; echo "END:VTIMEZONE\r\n";

After: => echo "BEGIN:VTIMEZONE\r\n"; echo "TZID:Europe/Paris\r\n"; echo "TZURL:http://tzurl.org/zoneinfo-outlook/Europe/Paris\r\n"; echo "X-LIC-LOCATION:Europe/Paris\r\n"; echo "X-WR-TIMEZONE:Europe/Paris"; echo "BEGIN:DAYLIGHT\r\n"; echo "TZOFFSETFROM:+0100\r\n"; echo "TZOFFSETTO:+0200\r\n"; echo "TZNAME:CEST\r\n"; echo "DTSTART:19700329T020000\r\n"; echo "RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\n"; echo "END:DAYLIGHT\r\n"; echo "BEGIN:STANDARD\r\n"; echo "TZOFFSETFROM:+0200\r\n"; echo "TZOFFSETTO:+0100\r\n"; echo "TZNAME:CET\r\n"; echo "DTSTART:19701025T030000\r\n"; echo "RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\n"; echo "END:STANDARD\r\n"; echo "END:VTIMEZONE\r\n";

During installation it's possible to have it in french by made following modification: A language selector should be a nice to have during installation.

BNote\lang.php $l = "fr"; $this->lang = "fr";

BNote\install.php ('language', 'de', 1), ('language', 'fr', 1),

Plus most of sql parameter can be translate manually without alter the function.

Thanks

mattimaier commented 1 year ago

I think we have to do more:

Since this is not a minor change and likely needs quite a bit of testing, I would like to postpone it to 4.1.0