playframework - Inserting default data she user signup with secure social -


when user signup on system, want data insert on database (default data, sample data).

i did on method save of userservice plugin. it's working, problem i'm facing language of user not available, when use messages api translate sample data translate default language.

i've tried adding implicit save method broke trait (in scala case) , on java same thing. (yes, i'he tried writing java , scala userplugin not knowing scala).

how can this? there way can user language on save method? or there place better doing this?

i dont think understand question. can user's browser's default language on request @ controller by

if (request.acceptlanguages.size > 0) {    val lang = request.acceptlanguages(0).code    //assgin user language play_lang(cookies)     redirect("/").withlang(play.api.i18n.lang(lang))  } 

now there cookie in user's browser can user language

request.acceptlanguages returns list of accepted languages user's browser


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -