Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

feat: allow library users to add locales #1055

Merged
merged 1 commit into from
Jun 16, 2022
Merged

feat: allow library users to add locales #1055

merged 1 commit into from
Jun 16, 2022

Conversation

luncheon
Copy link
Contributor

This PR exposes the localeObj of locale.js by including it in the core luckysheet object with the name locales.
This allows library users to add locales.

luckysheet.locales.ja = { ... };

In some cases, it is not practical to translate all the localizable words, but only some of them.
Such cases can also be handled.

luckysheet.locales.ja = {
    ...luckysheet.locales.en,
    toolbar: {
        ...luckysheet.locales.en.toolbar,
        undo: '元に戻す',
    },
};

@dream-num dream-num merged commit f535d26 into dream-num:master Jun 16, 2022
@dream-num
Copy link
Collaborator

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants