Translate text of igraph

igraph_translator(
  ig,
  from = "en",
  to = "zh",
  which = c("vertex", "edge", "all")[1],
  verbose = TRUE
)

Arguments

ig

igraph object to be translated

from

source language

to

target language

which

vertex, edge, or all

verbose

verbose

Value

igraph object

Examples

if (FALSE) { # \dontrun{
library(igraph)
ig <- make_graph(c("happy", "sad", "sad", "angry", "sad", "worried"))
plot(ig)
ig2 <- igraph_translator(ig)
font_file <- "/System/Library/Fonts/Supplemental/Songti.ttc"
sysfonts::font_add("Songti", font_file)
plot(ig2, vertex.label.family = "Songti")
} # }