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

Multilanguage / Localization improvement #525

Open
encodeuramateur opened this issue Oct 5, 2022 · 1 comment
Open

Multilanguage / Localization improvement #525

encodeuramateur opened this issue Oct 5, 2022 · 1 comment

Comments

@encodeuramateur
Copy link
Contributor

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
Copy link
Owner

I think we have to do more:

  • Change the install welcome page to a more international approach with a language selector
  • Based on the selected language, insert the data in the database
  • Write a language configuration parameter in the config.xml file to become available from start
  • Update the above mentioned files to read the proper language settings

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

@mattimaier mattimaier modified the milestones: BNote 4.0.2, BNote 4.1.0 Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants