DataWeave is a functional language specialized for transforming data. It does not has a "for loop" structure. It does has a map() function that can be used to transform arrays. I understand that you want to execute the same API request for different languages. For that you should use the Foreach scope for flows in Mule. You can combine both, using map() to create an array of requests for each language, and the Foreach scope to iterate over the list of requests inputs and execute the actual request.
Example with languages selected at random:
<set-payload value="A quitter never wins and a winner never quits"/>
<set-variable variableName="languages" value="#[ ['en', 'et', 'ru', 'nl', 'pl', 'it'] ]"/>
<ee:transform doc:name="Transform Message">
<ee:message >
<ee:set-payload ><![CDATA[%dw 2.0
output application/java
---
vars.languages map
{ "text": [payload], "source": "en", "target": $ }
]]>
</ee:set-payload>
</ee:message>
</ee:transform>
<foreach doc:name="For Each">
<logger message="sending request to translate: #[payload]"/>
<!-- call the translation API -->
</foreach>
The logger output will be:
sending request to translate: {text=[A quitter never wins and a winner never quits], source=en, target=en}
sending request to translate: {text=[A quitter never wins and a winner never quits], source=en, target=et}
sending request to translate: {text=[A quitter never wins and a winner never quits], source=en, target=ru}
sending request to translate: {text=[A quitter never wins and a winner never quits], source=en, target=nl}
sending request to translate: {text=[A quitter never wins and a winner never quits], source=en, target=pl}
sending request to translate: {text=[A quitter never wins and a winner never quits], source=en, target=it}