#' get_berlinerisch
#'
#' Translates German to Berlin dialect
#'
#'
#' @param txt provide a text you want to translate from German to Berlin dialect
#' @export
get_berlinerisch<- function(txt) {
html <- rvest::session("http://parallelnetz.de/Berliner?phrase=")
berlinform <- rvest::html_form(html)[[1]]
berlinform_in <- rvest::html_form_set(berlinform, phrase = txt)
resp <- rvest::html_form_submit(berlinform_in, submit = 1)
fin <- rvest::read_html(resp) %>%
rvest::html_table() %>%
.[[1]] %>%
.[2, 2] %>%
stringr::str_replace("Ã\u009c", "Ü") %>%
stringr::str_replace("ü", "ü") %>%
stringr::str_replace("ä", "ä") %>%
stringr::str_replace("Ã\u0084", "Ä") %>%
stringr::str_replace("ö", "ö") %>%
stringr::str_replace("Ã\u0096", "Ö") %>%
stringr::str_replace("Ã\u009f", "ß")
return(fin)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.