Comments (13)
@Northerner-coder Take a look at #48.
Actually I had this thing in my mind but never pushed it as no one requested :p
The i18n
idea is more of a time consuming process, I think if user wants his/hers website localized best way is add the months yourself for language needed
The linked PR does that.
Also can you test the code out for your native language and let me know if it goes well.
Thank You.
~ Aditya
from hugo-papermod.
@adityatelange Thank you! Checked the #48 - works like a charm.
Main advantage of i18n
before this solution: it will work out-of-the-box if filled in the localization file, user needs only to choose the language. Additionally, all localization stays in one place, leaving config with more settings and less content directives.
Do you mind if I test i18n
option out to see whether and how it works in practice? After that you can decide which option to use.
from hugo-papermod.
@Northerner-coder even if we add i18n we cannot support each and every language.
Translations can be tough, words mean different than the actual action that the keyword button does.
After this I am even thinking to rule of i18n and let the user choose the keywords they want. What do you think ?
Hugo's Internationalisation never worked out of the box, there are few things yet to be implemented.
from hugo-papermod.
After this I am even thinking to rule of i18n and let the user choose the keywords they want. What do you think ?
Sorry, didn't get the part about choosing the 'let the user choose the keywords'.
from hugo-papermod.
After this I am even thinking to rule of i18n and let the user choose the keywords they want. What do you think ?
Sorry, didn't get the part about choosing the 'let the user choose the keywords'.
I mean let the user choose the translations for words on the buttons if they aren't listed
from hugo-papermod.
Also I am rethinking about PR #48,
This will only add month translations to archive page,
We can add to other elements too but hugo supports multiple formats for date
This format can be applied only to a few( not Mon Jan 2 2006
, not Mon, 02 Jan 2006 15:04:05 -0700
, moreover the days, will remain as it is.
from hugo-papermod.
After this I am even thinking to rule of i18n and let the user choose the keywords they want. What do you think ?
Sorry, didn't get the part about choosing the 'let the user choose the keywords'.
I mean let the user choose the translations for words on the buttons if they aren't listed
I guess it means adding i18n for all interface text. As far as I understand this is a standard way for multi-language support.
from hugo-papermod.
Also I am rethinking about PR #48,
This will only add month translations to archive page,
We can add to other elements too but hugo supports multiple formats for date
This format can be applied only to a few( not
Mon Jan 2 2006
, notMon, 02 Jan 2006 15:04:05 -0700
, moreover the days, will remain as it is.
The issue with localized date is a Go problem in general. There are packages that allow to sort it out. I do not think that it is feasible to use them in Hugo theme context.
Yes, months translation will be limited to archives and any other cases where month should be written in full (none at the moment).
As to dares in general, I proposed date format exactly to avoid commotion with the dates localization. For instance in Russia it is customary to use date format 18.10.2020. Using digits only I am not concerned with the localization. This is a half measure, but an effective one.
from hugo-papermod.
I guess it means adding i18n for all interface text. As far as I understand this is a standard way for multi-language support.
Yes it is a standard way but the problem is we cannot translate over languages people use, so it might be better to give them a choice to add their own translations for themselves without touching the i18n
directory, but from config.yml
itself,
As we can have multople config file user could add a config.tranlate.yml
so that preferred translations could be used
from hugo-papermod.
@adityatelange tried alternative implementation for months translation via i18n #50 - for better comparison.
Sure, translations can be done in config as well. However i18n provides additional functionality for translations, for instance including integer inside of a translation string and multiple options depending on the integer (one, many, etc.). I am not sure that it is easy to implement via config.
from hugo-papermod.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from hugo-papermod.
consider to using js: moment or dayjs ?
defect:
- not static
- need some language pack
from hugo-papermod.
consider to using js: moment or dayjs ?
defect:
- not static
- need some language pack
Yes, it hinders performance.
from hugo-papermod.
Related Issues (20)
- [BUG] Render of "page" failed: HOT 1
- Output order CSS reversed since Hugo v0.123.0 HOT 1
- [BUG] Images quality was degraded HOT 3
- [BUG] Minified build errors with: expected comma character or an array or object ending on line... HOT 4
- Errors when updating PaperMod HOT 1
- Integratring Cactus Comments
- [BUG] Pipeline after Theme Switch button even with Single Language Sites HOT 3
- dead links in wiki HOT 1
- Is it possible to prevent specific pages from showing up in archive pages?
- [BUG]In the f5c737f version, using the `hugo --minify` command will report an error.
- Hierarchical menus? HOT 1
- [BUG] Build Error - expected comma character or an array HOT 1
- [BUG] HTML invalidator: Trailing slash on void elements
- [BUG] Wiki: Installation - Expand Method 4
- Social Icon Request: SpaceHey
- Make Twitter card's content value configurable HOT 2
- Support adding Link to footer for Privacy Policy or Footer HOT 3
- [BUG `googleAnalytics` was deprecated
- Social icon for exercism
- Hugo Aliases Not Working as Expected HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hugo-papermod.