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

i18n #258

Open
spirau opened this issue Feb 8, 2017 · 1 comment
Open

i18n #258

spirau opened this issue Feb 8, 2017 · 1 comment

Comments

@spirau
Copy link

spirau commented Feb 8, 2017

If it's quite easy to use i18n for the key descriptions, it's more tricky for cheatSheet. Going thru the provider to set the cheatSheetDescription & templateTitle for example does'nt work because at this stage on starting the angular application, the user language is not known. Also it could change on the fly.
The hotkeys variable like cheatSheetDescription are accessible anytime, but the content of theses variables has been cloned to the internal scope.
So we need a clean way to late bind these variables or a way to modify the variables in the internal scope.

@kroltan
Copy link

kroltan commented Feb 15, 2018

Hi @spirau.

Quite late reply, but the way I've been doing it is by replacing the template entirely with one that contains translation directives. To translate the keycombos themselves (for example, ctrl is called strg in German, I patch the format function of the Hotkey prototype.

Sure, it's quite a bit hackish, but it works, considering this library is unmaintained.

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

No branches or pull requests

2 participants