Posts: 65
Threads: 7
Joined: Apr 2010
Hi,
<?php echo __(' '$get_page_title' '); ?> but not work..
( I do not know much about the method of eval() )
How can I run?
Thank you!
Posts: 972
Threads: 27
Joined: Aug 2009
Try again, I don’t really understand your question. What do you need your code to do?
Posts: 65
Threads: 7
Joined: Apr 2010
Hi Zegnåt,
Zegnåt Wrote:Try again, I don’t really understand your question. What do you need your code to do?
<?php echo__('
Zegnåt ')>
Zegnåt: <?php get_page_title(); >
Zegnåt instead of.. I want to write
> <?php get_page_title(); >
Posts: 1,204
Threads: 30
Joined: Jun 2010
2010-10-07, 04:26:19
(This post was last modified: 2010-10-07, 04:26:59 by BlackRose.)
Use
Code:
<?php return_page_title(); ?>
(you forgot to close php script tag with "?" by the end)
ps. I have no idea about what we are talking in this thread.
Addons: blue business theme, Online Visitors, Notepad
Posts: 65
Threads: 7
Joined: Apr 2010
2010-10-07, 04:56:21
(This post was last modified: 2010-10-07, 04:56:51 by mmarchello57.)
yojoe Wrote:<?php return_page_title(); ?>
Hi yojoe,
The script code in this way: <?php echo__('
PAGE TITLE') ?>
Here's the "
text" content is turning into another language (eg EN->TR)
But I would like to add the path of the script code
<?php get_page_title(); ?>
(unfortunately, my English is not very good)
use:
http://codecanyon.net/item/website-trans...view/69435
Posts: 972
Threads: 27
Joined: Aug 2009
Code:
<?php echo __(return_page_title()); ?>
return_page_title() gives you the page title as a string. Your __() function wants a string to translate. So the above code should be what you’re looking for.
Posts: 65
Threads: 7
Joined: Apr 2010
Zegnåt Wrote:Code:
<?php echo __(return_page_title()); ?>
return_page_title() gives you the page title as a string. Your __() function wants a string to translate. So the above code should be what you’re looking for.
@yojoe Thank you! Also thank you @Zegnåt
works perfectly;
Code:
<?php echo __(return_page_title()); ?>
Posts: 65
Threads: 7
Joined: Apr 2010
return_page_title ok thanks! Does the same apply in get_page_content? :/
Posts: 972
Threads: 27
Joined: Aug 2009
Johonwayni Wrote:Does the same apply in get_page_content? :/
No. All get_* functions use “echo†to display content, and you need a string for your function. There is no return_* function for the page content, so you will have to come up with your own solution.
I haven’t tested this, but it should work. Add the following function to your code:
Code:
function return_page_content() {
global $content;
$content = stripslashes(htmlspecialchars_decode($content, ENT_QUOTES));
$content = exec_filter('content',$content);
return $content;
}
Now you have a way to return the content and you can do this:
Code:
<?php echo __(return_page_content()); ?>
Posts: 65
Threads: 7
Joined: Apr 2010
Cool! I worked for this function watches, but did not work
.. Your written function works very well. Again
thank you so much Zegnåt!