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

Support more languages #389

Open
v1r0x opened this issue Jun 11, 2021 · 0 comments
Open

Support more languages #389

v1r0x opened this issue Jun 11, 2021 · 0 comments

Comments

@v1r0x
Copy link
Member

v1r0x commented Jun 11, 2021

Currently Spacialist only supports english and german language. Any other language is very welcome! No matter if they are widespread (as e.g. french, italian, arabic) or endangered (e.g. hawaiian).

To add translations for another language simply

  1. duplicate resources/js/i18n/en.js and rename it to match your country code and, if required, your region (e.g. fr for french or en-gb for british english or simply en for non-regional english vocabulary).
  2. Rename in the first line of your duplicated file const en to const CODE and at the end of your file export default en to export default CODE
  3. Edit resources/js/bootstrap/i18n.js and import your new added language (import CODE from ../i18n/CODE) and add it to the messages object

Example (adding french)

Before

// Some imports ...
import en from '../i18n/en';
import de from '../i18n/de';

const messages = {
    en: en,
    de: de
}

// More code

After

// Some imports ...
import en from '../i18n/en';
import de from '../i18n/de';
import fr from '../i18n/fr';

const messages = {
    en: en,
    de: de,
    fr: fr,
}

// More code
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

1 participant