Created
January 16, 2017 17:32
-
-
Save KacT9H/236e684459c698a38533c046b45c5d56 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HomeController { | |
def springSecurityService | |
//... | |
def changeLocale(String locale) { | |
def user = springSecurityService.currentUser as User | |
user.locale = new Locale(locale) | |
user.save() | |
//put locale to lang param | |
redirect action: 'index', params: [lang: locale] | |
} | |
//... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment