- This topic has 12 replies, 4 voices, and was last updated 5 years, 5 months ago by
David.
-
AuthorPosts
-
November 3, 2020 at 6:15 am #1515988
NIKOLAY
Dear GeneratePress,
I’m trying to translate the the Word ‘Day:’ in arhive page (https://webpage/?m=YYYYMMDD). However I cannot find out where to change. Neither with Loco translate plugin or the file structure. Can you help me?
Have a pleasant day.
Nikolay
November 3, 2020 at 7:59 am #1516353David
StaffCustomer SupportHi there,
so you want to translate the URL ?
November 3, 2020 at 8:24 am #1516405NIKOLAY
Hi David,
No. After header and before the content of archive page, just above the 1st title of post from any day is says
(Day: 03.11.2019). I just want to translate ‘Day’ in my language. I could not find that string in Generetepress theme or wordpress.Regards: Nick
November 3, 2020 at 9:19 am #1516493David
StaffCustomer SupportCan you share a link where i can see this?
November 3, 2020 at 9:20 am #1516498NIKOLAY
yes sure.. I wll add in private information bellow
November 3, 2020 at 9:23 am #1516499NIKOLAY
Same problem I have with next or to the previous text as well
November 3, 2020 at 1:36 pm #1516843Tom
Lead DeveloperLead DeveloperHi there,
The “Day: ” text is provided by WordPress itself. You can find it here: https://developer.wordpress.org/reference/functions/get_the_archive_title/
A translation plugin should be able to change that string. However, it should be translated automatically if you’ve chosen your language in “Settings > General”.
As for the next/previous text – where can I see that?
November 3, 2020 at 2:26 pm #1516893NIKOLAY
November 3, 2020 at 5:02 pm #1516982Elvin
StaffCustomer SupportHi,
For the previous/next text displays, you can use this PHP snippet:
add_filter( 'generate_next_link_text', function() { return 'следующий'; } ); add_filter( 'generate_previous_link_text', function() { return 'предыдущий'; } );You can change the return values to any text string you prefer.
Here’s how to add PHP – https://docs.generatepress.com/article/adding-php/
November 3, 2020 at 10:50 pm #1517154NIKOLAY
Thanks for your help.
I add it this PHP snippet as Hook Elelemts after body tag in entire web site.
Best regards: Nick
November 4, 2020 at 2:33 am #1517332David
StaffCustomer SupportHi there,
add_filter hooks should not be placed in the Hook elements, as they should not be executed on the front end, although the may work you should add them using one of the methods here:
November 4, 2020 at 6:48 am #1517615NIKOLAY
Thanks for your help David!
I did what you suggest – deleted hook element and create my custom plugin where I run the PHP snippet of add_filter.
With hook elements was working too but I agree with you that via custom plugn is much safer for my web.
Regards,
NickNovember 4, 2020 at 6:49 am #1517695David
StaffCustomer SupportGlad to hear that!
-
AuthorPosts
- You must be logged in to reply to this topic.