Jump to content
Sign in to follow this  
olsenlid

Translating a word in the display of date under the post-title

Recommended Posts

olsenlid

I was looking through library.shortcodes.php and was able to change/translate the "Leave a comment" link. I want to change a word which sits in front of the date as well, but couldn't find it in the afformentioned php-file. Example: TITLE TITLE TITLE on 11. APRIL 2011 ?· Leave a comment [Edit] I want to translate the bolded word, but I can't find it anywhere in the php-file. Any thoughts on where I can find it? Thanks!

Share this post


Link to post
Share on other sites
cmunns

It's a function that you can actually filter. Add this to your -Base functions.php file ` add_filter('pagelines_post_metabar', 'your_function'); function your_function($metabar){ $metabar = sprintf( '%s [post_date] ', __('On','pagelines') ); return $metabar; } ` See the word "on" you can change it there although technically it is localized and should translate via a .po/.mo file

Share this post


Link to post
Share on other sites
olsenlid

Okey, I did what you said, and I it got translated. But now there is no Leave a comment link to the right of the date. Is there a conflict somewhere? Here's my blog; http://krigogfred.com/

Share this post


Link to post
Share on other sites
timlinson

Hmm it's there when I look at it. This is what I see:

den 11. APRIL 2011 ?· LEGG IGJEN EN KOMMENTAR

Share this post


Link to post
Share on other sites
olsenlid

Hello Tim, I put up a fresh copy of pagelines to solve another problem I was having, so the code that Adam suggested isn't implemented yet by me. The problem, however, is that when I apply his 'hack', Everything after the date goes away (this part: ?· LEGG IGJEN EN KOMMENTAR) So instead of "den 11. APRIL 2011 ?· LEGG IGJEN EN KOMMENTAR" I'll say "den 11. APRIL 2011" Any thoughts on that one? Actually, I wanted to go a bit further, and just remove the word "on" entirely, and only display the date with no pre-text at all. The way I did this was to install the CodeStyling Localization plugin, and replace the "on"-word with a blank space in the translation part of the plugin (hope that made sense hehe) Anyways, thanks for all your help guys! Excellent theme, and a steal at the price you're offering it at :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×