Get language — get_lang • languagelayeR

# Get language

Detect language from a character string.

    get_lang(query, api_key = NULL)

## Arguments

query | the character string you want to detect the language from.
api_key | your API key.

## Value

Returns a data.frame with the detected languages, in descending order of probability. Values are : language_code, language_name, probability (length of the provided query text and how well it is identified as a language), percentage (confidence margin between multiple matches), and reliable_result (whether or not the API is completely confident about the main match).

## Details

Takes a character string, returns a data.frame with the available values.

## Note

Before running a function of this package for the first time, you need to set your API key using the `setApiKey` function.

## Examples

    get_lang(query = "I really really love R and that's a good thing, right?", api_key = "apikey")#> Warning: API error, code: 101 invalid_access_key You have not supplied a valid API Access Key. [Technical Support: support@apilayer.com]#> [1] language_code   language_name   probability     percentage
    #> [5] reliable_result
    #> <0 rows> (or 0-length row.names)