According to the Lua manual, os.date() should return a localised strings for day and month:
print(os.date("today is %A, in %B"))
All representations follow the current locale. Therefore, in a locale for Brazil-Portuguese, %B would result in "setembro" and %x in "16/09/98" .
When exporting to HTML5 and Facebook Instant the locale appears to be hard coded to English (which is the language of the build machine) in the dmloade.js file. Is this right?
The Lua code for os.date() is here (5.2, but 5.1 is almost identical):
It uses gmtime() or localtime() in combination with strftime() to get the time in a struct, parse the string and use strftime() to replace %A, %B etc.
This means that it is strftime() that is responsible for transforming values into localized variants.
Calling os.setlocale() before calling os.date() works on desktop:
os.setlocale("pt_BR")
print(os.date("today is %A, in %B")) -- today is Terça Feira, in Março
But unfortunately not on HTML5… I’m uncertain if it’s possible to somehow change this at runtime. I think it’s better to use html5.run() and call some Javascript function to get a formatted string.