Help:Lingua
Lingua is the scripting language used in Povo templates and search templates.
Lingua provides simple statements like "if" and "foreach", and basic functions like Now (to get the current date) and print (to output things). Here is an example Lingua program illustrating its main features:
print("Hello")
if SomeTemplateArgument is not empty
print(SomeTemplateArgument)
end
To get started with Lingua, check out
Help:Lingua Basics.
We don't like inventing new programming languages, but there are several primary reasons we did this:
- We wanted something that aimed for simplicity over power. Flow control and iteration were the primary goals, not Object Oriented Programming or encapsulation.
- We wanted something localizable into many languages. The French Povo users shouldn't have to learn an English programming language.
- We needed incredibly high performance and execution control. We compile Lingua and make sure there are no run-away loops, overly expensive functions, etc.
- We wanted a language whose type system worked well with the wiki method of passing data into a template
Given the above goals, we started with Lingua. But we are also at work on a Javascript interpreter for those of you more familiar with traditional web programming, and are exploring Lua and similar languages. If you have expertise in these areas, please contact us, we'd love to expand the toolset.
Thank you for your contribution. You've taken a huge step to making Povo the "word on the street,"
and we appreciate it very much. Because of the complexity of the "wiki text" and code that can be used
on Povo, in order to edit this section in the future you must click the "edit" button to the right of the section
heading (or for the whole page).