Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
miku committed Jul 7, 2021
1 parent 3b661a7 commit 8360799
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions langutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ func DetectLang3(text string) (string, error) {
return whatlanggo.LangToString(whatlanggo.Detect(text).Lang), nil
}

// LanguageIdentifier returns the three letter identifier from any string.
// All data from http://www-01.sil.org/iso639-3/codes.asp.
// LanguageIdentifier returns the three letter identifier from a variety of
// language name notations. Returns the empty string, if nothing matches. All
// data from http://www-01.sil.org/iso639-3/codes.asp.
func LanguageIdentifier(s string) string {
s = strings.TrimSpace(s)
switch len(s) {
Expand Down

0 comments on commit 8360799

Please sign in to comment.