---
title: "Introduction to Linguee API"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Introduction to Linguee API}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  eval = FALSE
)
```

# Introduction

The `polyglotr` package provides convenient functions to access the Linguee API and retrieve translations, examples, and external sources. This vignette demonstrates the usage of three key functions: `linguee_external_sources()`, `linguee_translation_examples()`, and `linguee_word_translation()`.

```{r}
library(polyglotr)
```



## External Sources

The `linguee_external_sources()` function retrieves external sources using the Linguee Translation API. Here's an example usage:

```{r}
external_sources <- linguee_external_sources("hello", src = "en", dst = "de")

print(external_sources)
```


## Translation Examples

The `linguee_translation_examples()` function provides translation examples using the Linguee Translation API. Here's an example usage:


```{r}
translation_examples <- linguee_translation_examples("hello", src = "en", dst = "de")

print(translation_examples)
```



## Word Translation

The `linguee_word_translation()` function translates a word using the Linguee Translation API. Here's an example usage:


```{r}
word_translation <- linguee_word_translation("hello", source_language = "en", target_language = "de")

print(word_translation)
```


