heldercervantes Posted November 30, 2016 Share Posted November 30, 2016 Hi guys. I'm having this weird problem with translatable text. I have it in just about every template of the site and it works fine with one exception. In every template I'm including a footer, using a regular: <?php include('includes/footer.inc.php'); ?> Then in that file I have this: <footer> <div class="row"> <div class="slogan"><?= $home->slogan; ?></div> <div class="social"> <?= __('Follow us'); ?> ... That "follow us" string shows up to be translated on the cms, and so does a second string I have a few lines down, but on the frontend it always renders what's in the code. It doesn't replace with what's set on either the current language or the default language. Just ignores everything. Any idea what's going on here? Thanks, H Link to comment Share on other sites More sharing options...
AndZyk Posted November 30, 2016 Share Posted November 30, 2016 Hello @heldercervantes, inside includes the following string translation should work: $this->_('Follow us'); Regards, Andreas 2 Link to comment Share on other sites More sharing options...
Zeka Posted December 1, 2016 Share Posted December 1, 2016 Hi @heldercervantes. It looks very similar to my issue, checkout this topic 4 Link to comment Share on other sites More sharing options...
heldercervantes Posted December 2, 2016 Author Share Posted December 2, 2016 Thanks for your help. I used Ryan's suggestion of starting the path to my includes with "./" <?php include('./includes/footer.inc.php'); ?> Worked like a charm. 1 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now