Most public recipes are in English by default.
However, linguistic groups lile L'Aliance Francophone provide group recipes in their own language.
It's relatively easy to translate a recipe to another language.
Open the code and search for the texts between braquets " XXX ". You'll find these texts in the print() commands and in dialog. parameters. Just translate these texts to your language and you get a translated version.
For exampe, translate
print("hello world")
to
print("Bonjour tout le monde").
Examples of multilingual recipes are JET or Ebola Rebuild . These recipes "automatically" provide the French version for L'Aliance Francophone and known French speaking players. It's easy to translate these "multilingual" recipes by adding a new language in their multilingual(lang) function at start. Or if you want the French version, just change the option lang="en" to lang="fr".
Example of dialog panel translation:[]
English version[]
function GetParams()
local FirstCheckbox= false local FirstSlider= 0
dlg = dialog.CreateDialog("Title of the dialog pannel")
dlg.FirstCheckbox = dialog.AddCheckbox("Text of the check box",FirstCheckbox)
dlg.Firstlabel = dialog.AddLabel("Any free label")
dlg.FirstSlider = dialog.AddSlider("Label of the slider", FirstSlider, 0, 10, 1)
dlg.ok = dialog.AddButton("OK button", 1)
dlg.cancel = dialog.AddButton("Cancel button text", 0)
if dialog.Show(dlg) > 0 then
FirstCheckbox=dlg.FirstCheckbox.value
FirstSlider=dlg.FirstSlider.value
return true
else
return false
end
end
GetParams()
===
Translation to French:[]
function GetParams()
local FirstCheckbox= false
local FirstSlider= 0
dlg = dialog.CreateDialog("Titre de la fenêtre de dialogue")
dlg.FirstCheckbox = dialog.AddCheckbox("Texte de la case ☀ Ã cocher",FirstCheckbox)
dlg.Firstlabel = dialog.AddLabel("Texte libre")
dlg.FirstSlider = dialog.AddSlider("Sélecteur", FirstSlider, 0, 10, 1)
dlg.ok = dialog.AddButton("OK", 1)
dlg.cancel = dialog.AddButton("Abandonner", 0)
if dialog.Show(dlg) > 0 then
FirstCheckbox=dlg.FirstCheckbox.value
FirstSlider=dlg.FirstSlider.value
return true
else
return false
end
end
GetParams()