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

Add getLanguageCode to src/Users/User.php shared methods #1

Open
johntiror opened this issue Sep 26, 2017 · 1 comment
Open

Add getLanguageCode to src/Users/User.php shared methods #1

johntiror opened this issue Sep 26, 2017 · 1 comment

Comments

@johntiror
Copy link

Add to User.php:

class User implements UserInterface
{
    /** 
    * @return string
    */
    public function getLanguageCode() {
    }
}

The function MUST return the IETF language tag of the user's language if available, null otherwise.

Note:

  • Telegram returns exactly the IETF language tag of the user's language
  • Facebook returns the locale in the form en_US, in such case the function MUST return the first two chars
@polyskalov
Copy link

Viber supports user language too.

Quite a useful feature. @botman, there are some updates on this task?

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

2 participants