Change WordPress language based on user setting

Your use of $current_user is a little wrong, you should include the global $current_user or assign it to a variable, or shorter and cleaner just get_current_user_id():

add_filter('locale', 'change_lang');
function change_lang( $locale ) {

   if( $lang = get_user_meta( get_current_user_id(), 'user_lang', true) ) {
       return $lang;
   }

   return $locale;

}

tech