Wolfram Research

Function Repository Resource:

SymbolNameTranslate

Source Notebook

Get the translated name of a Wolfram Language symbol in a given language

Contributed by: Renan Soares Germano

ResourceFunction["SymbolNameTranslate"][str,lang]

returns the translated name for the symbol named in str for the language lang.

ResourceFunction["SymbolNameTranslate"][sym,lang]

returns the translated name for the symbol sym in the language lang.

Details and Options

This function uses the "Translations" property for the Entity that represents the Wolfram Langugage symbol.
The Entity for the symbol is taken using the WolframLanguageData function.
It is not possible to get a translation using the English language as the second argument because this is the original language of the symbol name.

Examples

Basic Examples

Get the Spanish translation for a symbol using strings:

In[1]:=
ResourceFunction["SymbolNameTranslate"]["MapThread", "Spanish"]
Out[1]=

Get the Portuguese translation for some symbols:

In[2]:=
ResourceFunction["SymbolNameTranslate"][#, "Portuguese"] & /@ {Real, Graph, Sin, ListPlot}
Out[2]=

Scope

For symbols that evaluate, use Unevaluated and SymbolName to retrieve translations. Get the German translation of $PublisherID:

In[3]:=
ResourceFunction["SymbolNameTranslate"][
 SymbolName@Unevaluated[$PublisherID], "German"]
Out[3]=

Possible Issues

The set of possible results is not complete for all symbols and languages. The following code for a symbol returns the available translations:

In[4]:=
symbolName = "Graphics";
WolframLanguageData[symbolName]["Translations"][[All, 1]] // Sort
Out[5]=

Neat Examples

Create a table of translations:

In[6]:=
languages = {"Portuguese", "Spanish", "German", "Japanese"};
someSymbols = {Language, N, Pi, Sin, Cos, TableForm, Unevaluated[$Aborted]};
translations = Function[lang, Prepend[ResourceFunction["SymbolNameTranslate"][#, lang] & /@ someSymbols, Style[lang, Bold]]] /@ languages;
Grid[Prepend[translations, Style[#, Bold] & /@ Prepend[SymbolName /@ someSymbols, " "]], Frame -> All]
Out[9]=

Resource History

Source Metadata

Related Resources

Author Notes

This function only works for built-in symbols of the Wolfram Language.

License Information