I suggest processing translations at compile time. Each output statement would be matched against a translation at compile time and if a match is found, the output statement would be translated into a function call. For example:
in App.luan:
function App.congratulations_notice() %>
<div class="big-title second-font"><%%>Congratulations!<%%></div>
<%%>Your <%=page_node.lower_case_view_name()%> has been successfully created.<%%><br/>
...
<% end
in Spanish.luan
module "Spanish"
function tu_ha_sido_creado(what)
...
end
Spanish["Congratulations!"] = function() %>¡Felicidades!<% end
Spanish["Your <%=%> has been successfully created."] = tu_ha_sido_creado
Package.loaded.Translation = Spanish