picosh / pico

hacker labs - open source and managed web services leveraging SSH
https://pico.sh
MIT License
741 stars 25 forks source link

i18n in html #97

Open fab1an2 opened 3 months ago

fab1an2 commented 3 months ago

https://gohugo.io/functions/lang/translate/ many functions for localization is in system, but I need only date-time property format and months name. Meybe add simple 'lang' value in _readme.md or similar place?

neurosnap commented 3 months ago

Hi! If I'm understanding you correctly, you want a function that you can use to translate words inside your markdown files?

geek-9 commented 3 months ago

If I'm undestand corectly, he want a options to setup different specific language things: date, separator, name of months. Not inside markdown but what system generated. When Your browser setup french language it first search a french version of web page. And show date in french on blog post.

look https://s10n.prose.sh/hello-world 28 Feb, 2024 · s10n's blog in french is Février not february

neurosnap commented 3 months ago

Ahh, okay that makes sense. I think this might be possible, will try to prioritize this shortly.

Here is our markdown parser that extract frontmatter data if anyone is feeling ambitious to provide this functionality:

og1en commented 3 months ago

yes exactly ;-) for example in _readme.md add lang: pl_PL and change the 404 message https://randomwork.prose.sh/buy1 "Post not found" to polish version "Nie odnaleziono wpisu" second trouble is automatic convert number to colon from 10.00 to 10,00 in polish version

neurosnap commented 1 week ago

Alright, I've deployed some changes that will hopefully help. First, I changed all dates to format: 2006-02-26. Further, users are able to upload a _404.md to provide their own text for not found posts.

Please let me know if this is not sufficient since I'd to make international support a priority -- within reason.