botman / botman/internals

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

Open
#1 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
No language data
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Add to User.php:

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

The function MUST return the [IETF language tag](https://en.wikipedia.org/wiki/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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.