Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n in html #97

Open
fab1an2 opened this issue Mar 12, 2024 · 5 comments
Open

i18n in html #97

fab1an2 opened this issue Mar 12, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@fab1an2
Copy link

fab1an2 commented Mar 12, 2024

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
Copy link
Member

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

@geek-9
Copy link

geek-9 commented Mar 12, 2024

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
Copy link
Member

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
Copy link

og1en commented Mar 13, 2024

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 neurosnap added the enhancement New feature or request label May 10, 2024
@neurosnap
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants