Skip to content

Instantly share code, notes, and snippets.

@smathot
Created January 3, 2016 10:55

Revisions

  1. smathot created this gist Jan 3, 2016.
    15 changes: 15 additions & 0 deletions atom-locale
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    #!/bin/bash
    # Usage:
    # atom-locale [locale]
    # Example (for French):
    # atom-locale fr_FR
    # Important note:
    # This permanently changes the locale for atom spellchecker.
    # To reset back to English, start with en_US locale.
    ATOM_HUNSPELL_FOLDER="/opt/atom/resources/app.asar.unpacked/node_modules/spell-check/node_modules/spellchecker/vendor/hunspell_dictionaries"
    HUNSPELL_FOLDER="/usr/share/hunspell"
    sudo mv "$ATOM_HUNSPELL_FOLDER/en_US.aff" "$ATOM_HUNSPELL_FOLDER/en_US.aff.bak"
    sudo mv "$ATOM_HUNSPELL_FOLDER/en_US.dic" "$ATOM_HUNSPELL_FOLDER/en_US.dic.bak"
    sudo cp "$HUNSPELL_FOLDER/$1.aff" "$ATOM_HUNSPELL_FOLDER/en_US.aff"
    sudo cp "$HUNSPELL_FOLDER/$1.dic" "$ATOM_HUNSPELL_FOLDER/en_US.dic"
    atom