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

Adding i18n/localization and static config option #5

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

micschk
Copy link

@micschk micschk commented Jul 2, 2019

  • adds & sets language JS file Requirement based on i18n current locale (from CDN, exernal dependency)
  • first day of week etc is also contained in language/locale files, so should be correct
  • adds the standard SS Yaml based config system to allow setting default configuration options for flatpickr

@todo:

  • could be extended to use contentLocale in front-end contexts to auto-include front-end i18n
  • could be refactored to include & expose the locale/language files so they could be loaded locally instead of via CDN

Fixes #2

@micschk
Copy link
Author

micschk commented Sep 15, 2019

Just noticed the controllerextension also includes the requirements in the front-end, probably undesirable. Added a uniquenessID so the requirements can at least be blocked for now.

eg PageController::init():

            $userLangIso = i18n::getData()->langFromLocale(i18n::get_locale());
            Requirements::block("//npmcdn.com/flatpickr/dist/l10n/$userLangIso.js");
            Requirements::block("FlatpickrLocalization");

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

Successfully merging this pull request may close these issues.

Calendar localization
1 participant