OllieMackJames Posted July 11, 2015 Posted July 11, 2015 <footer> <div class='row'> <div class='copy'> <p><img class='footer-logo' src='/img/footer-logo.png' alt='<?php echo __('Domain Slogan') ?>' width='173' height='37' /></p><?php echo __('2003 - 2015 domain.com All Rights Reserved.') ?> </div> <nav class='footer-nav'> <ul> <?php echo $nav ?> </ul> </nav> <div class='author'><?php echo __('2003 - 2015 domain.com All Rights Reserved.') ?> </div> </div> </footer> If I go to the translate thing in pw setup languages and load the file above the following works everytime: <?php echo __('Domain Slogan') ?> But the second one does not work, yet it is the exact same as the third one, only placed differently. This one does not work: <?php echo __('2003 - 2015 domain.com All Rights Reserved.') ?> This one works: <div class='author'><?php echo __('2003 - 2015 domain.com All Rights Reserved.') ?> </div> Anybody know what I am doing wrong here? Thanks!
LostKobrakai Posted July 11, 2015 Posted July 11, 2015 Translatable strings each need to be on their own line to work, as it's noted here: http://processwire.com/api/multi-language-support/code-i18n/#there-may-only-be-one-translation-function-call-per-line 1
OllieMackJames Posted July 11, 2015 Author Posted July 11, 2015 Translatable strings each need to be on their own line to work, as it's noted here: http://processwire.com/api/multi-language-support/code-i18n/#there-may-only-be-one-translation-function-call-per-line Thanks! that explains it.
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