Serbian language but Latin, not Cyrillic

Posted in: Newspaper
Post count: 1

Hi everyone,

I need a help to set the Serbian language as my default language of the theme so the date for posts would be showed in the Serbian language.

Website is zacinizivot.rs

In theme panel, there is only Cyrillic, but all my content is on Latinic and that’s a big issue now.

Thanks in advance,
Best regards

Post count: 20688

Hi,

The date format and language shown in the post page and modules will be the one from WordPress (so it depends on the language you select there)
https://www.screencast.com/t/DeJ5mVvcf
The theme doesn’t have a language setting besides translating the strings it uses on the frontend
https://forum.tagdiv.com/loading-translations/

If you are referring to specific fonts, you can load character subsets in the theme panel in order to display various font characters and symbols
https://www.screencast.com/t/YbbB4qpMnGm
https://forum.tagdiv.com/font-customization/

Thanks

Post count: 4

Hi,

This is my first post here, so hello everyone.

I’ve just started with Newspaper theme and I like it, however I’ve got a similar issue, one of the very first ones encountered (all other ones successfully dealt with already by learning and trying 😉 ).

It’s not a biggy and it’s great that it can be fixed by changing the WP site language, however it’s slightly inconvenient – my site is in Polish but I’m very much used to English version of WP admin, so much that it looks very strange to me now in Polish, actually 😀

Obviously, I can live with it (if it’s the only option), but is there any other way to get the contry/language-specific date format in the site (front-end) language whilst keeping the back-end in English (or any other language)? Or will I have to use sth like an external widget for that?

Thanks, regards

Tom

Post count: 20688

Hi,

Welcome to the forum. Indeed, the date format will depend on the language chosen in WordPress settings.
I did find a code which seems to work, it will keep the backend in English despite what language you select. This is the topic (last code in the topic)
https://wordpress.stackexchange.com/questions/32584/localization-i-want-the-backend-english-and-frontend-in-defined-language

You could give it a try, add it in the theme or child theme functions file.

Thanks

Post count: 4

Hi,

Thanks for that, I’ve read about child themes and it seems to me that it’s safer to do it via child theme, which is unaffected by potential future theme updates?

On another note, I just noticed that WP date format doesn’t display the date numbers with ordinal indicators (st, nd, rd, th) even when I changed this option in WP settings and WP preview shows it correctly, however the front-end does not (so WP preview shows correctly 20th October 2018 (either when set as default option or custom field), but the front-end still shows “20 October 2018”). The same btw happens when you set it in Polish, which is even more wrong, because the name of the month should change grammar form as well, and it stays in nominative. Is this sth that depends on your coding (theme) or should I ask WP about it? I deleted cache several times, logged out and back in and nothing helps. Am I missing sth here?

Apologies Sinisa for hijacking your thread 🙂

Thanks, regards

Post count: 20688

Hi,

It is safer, also you won’t have to redo theme modifications or additions after each update when the theme files are replaced.

This is a guide regarding the child theme provided in the theme package
https://forum.tagdiv.com/the-child-theme-support-tutorial/

About the suffix, I tried that as well. WordPress translates the other parameters like month and day name, but the suffix remains in English
https://www.screencast.com/t/mwQPP2l1HrW
I believe that is how it should be, in the codex the suffix is called “The English suffix for the day of the month”
https://codex.wordpress.org/Formatting_Date_and_Time
Maybe there are ways to translate this English suffix, I searched online for a while but I found no definite solutions.

Thanks

Post count: 4

Hi,

1) I’ll try with the child theme, although it’s not entirely clear from the documentation which parts of your -child template should be replaced, e.g. in functions.php:

a) In expression ‘add the parent style + style.css from this folder’ – what exactly is a ‘parent style’ and how to add it and where?
b) what’s the difference between ‘td-theme’ and ‘TD-THEME-VERSION’? Are there any other variables that shall be replaced?

2) Re date suffix – you’re right about English suffix, however I was talking about Polish date format, which is still wrong even without using this suffix. I can’t upload screenshots, but in Polish the name of the month shall change form in dates, and for some reason in the top bar it doesn’t. For example, the name of October in Polish is ‘październik’ (and it shall be lower case, rather than capital letter, by the way). However, in dates the month shall be written in different grammar form, with -a suffix, i.e. “23 października 2018”. Instead, in the top bar it is “23 Październik 2018”, which is double wrong, firstly because of the form, and secondly because of the capital letter.

Interestingly, in posts the date shows correctly as “23 października 2018”, and it corresponds with settings in WP admin panel, so I guess this is rather up to WP coding than your theme coding.

Looked like a simple topic at first… 🙂

Post count: 20688

Hi,

A child theme is useful if you plan to make code modifications to the theme files, or add code or CSS to it for example.
Note that CSS can also be added in the theme panel code sections, it will not be lost if the theme is updated.

1. The files that can be modified in a child theme are mentioned in the guide. If you have code to add you can which has to be entered in the functions file, add it in the child theme functions file, instead of the main theme.

If you want to add CSS in the child theme add it in the stylesheet provided with it. Then this CSS will be loaded together with the parent theme CSS.

Don’t make any modification to the code existing in the child theme functions file or stylesheet, no need for that.

2. Should be the same date for the whole website, it’s unusual that there are differences between posts and pages.
You could maybe edit the po file of the language with a po editor. The language files should be in wp-content/languages in WordPress files. Check how the months are translated.

Viewing 8 posts - 1 through 8 (of 8 total)
The forum ‘Newspaper’ is closed to new topics and replies.