Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Multilingual sites and format of dates

theme

Started by Gabriel L S Saraiva 5 years ago · 8 replies · 1399 views
5 years ago

Hi community!
I use theme Quark, because is clean and beauty.
I changed the language according to this article: https://learn.getgrav.org/17/content/multi-language
The theme that used on my blog page shows the date in English, even after I changed to my language. My website:

image|643x500

How can I solve this problem?

last edited 04/28/21 by pamtbaau
5 years ago

@UtherboneDEV, Have you tried searching the forum using for example: "multi language date"?

The first two hits will provide two different solutions. See if these may solve your issue.

👍 1
last edited 04/28/21 by pamtbaau
5 years ago

pamtbaau. Go Post

@UtherboneDEV, Have you tried searching the forum using for example: “multi language date”?

The first two hits will provide two different solutions. See if these may solve your issue.

I did not try, sorry, I tried to search with different words

Karmalakas. Go post

And since these two topics I now have a third solution 🙂
If you don’t mind extending a theme and its templates, here’s a plugin

I don’t mind extending a theme and its templates, thanks.
I will read the other two topics as well and attach them here if they are good solution for this case.

5 years ago

@Karmalakas, hi thanks for make the plugin.
I have problem. This plugin don't work on Quark Theme. not understand the problem.

Regards,
Gabriel

5 years ago

@UtherboneDEV, it won't work just like that. As I mentioned, you have to extend Quark theme and add the |td filter to the dates in templates where you need it

5 years ago

@pamtbaau:
it won’t work just like that. As I mentioned, you have to extend Quark theme and add the |td filter to the dates in templates where you need it

I didn’t think it would be a plugin problem, but rather something with templete so I didn’t send an insue request in the repository

@Karmalakas:
it won’t work just like that. As I mentioned, you have to extend Quark theme and add the |td filter to the dates in templates where you need it

I looked at your repository and saw the statement about filter |td. I tried the following in language file, however I get a grav treated error in full screen showing that this file has unknown syntax/ word error:

YAML
en:
  PLUGIN_TRANSLATE_DATE:
    F: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
    M: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
    l: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
    D: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']

I'm a little ingrave about Grav, could you guide me or update your repository with additional information that might help?

Sorry for the inconvenience, I know that you should be busy, I will study the documentation of Grav, to contribute here in the forum.

Regards,
Gabriel

5 years ago

At least the snippet you posted here is a valid Yaml. Could you open an issue afterall and provide as much info as possible? Like full Grav error and maybe full language file? I suspect some other lines might cause the error

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 99 16 hours ago
General · by pamtbaau, 21 hours ago
1 63 21 hours ago
General · by Andy Miller, 1 day ago
0 48 1 day ago
General · by Marcel, 12 months ago
6 357 5 days ago
General · by Duc , 6 days ago
3 45 6 days ago