---
title: "Introduction to languagelayeR"
author: "Colin FAY"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Introduction to languagelayeR}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

# languagelayerR

This package is designed to detect a language from a character string in R by acessing the languagelayer API — https://languagelayer.com/

## Language layer API 

This package offers a language detection tool by connecting to the languagelayer API, a JSON interface designed to extract language information from a character string. 

## Install languagelayerR

Install this package directly in R : 

From CRAN : 

```{r eval = FALSE}
install.packages("languagelayeR")
```

From Github :

```{r eval = FALSE}
remotes::install_github("ColinFay/languagelayeR")
```

## How languagelayeR works

The version 1.1.0 and further works with two functions. Which are :  
pkgdown::build_site(path = "inst/")

* `get_lang` Get language information from a character string

* `get_supported_lang` Get all current accessible languages on the languagelayer API


## First of all

Before any request on the languagelayer, you need to get your API key from your language layer [dashboard](https://languagelayer.com/dashboard).

## Examples 

### getLanguage 

Detect a language from a character string. 

```{r eval = FALSE}
get_lang(query = "I really really love R and that's a good thing, right?", api_key = "your_api_key")
```

### getSupportedLanguage 

List all the languages available on the languagelayer API. 

```{r eval = FALSE}
get_supported_lang(api_key = "your_api_key")
```

### Contact

Questions and feedbacks [welcome](mailto:contact@colinfay.me)!
