Language not load

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
Trubs
Registered User
Posts: 6
Joined: Thu Oct 04, 2018 7:03 pm

Language not load

Post by Trubs »

I have a language file:
ext/language/en/test.php:

Code: Select all

<?php
if (!defined('IN_PHPBB'))
{
    exit;
}

if (empty($lang) || !is_array($lang))
{
    $lang = array();
}

$lang = array_merge($lang, array(
    'TEST_LANG' => 'Test lang',
));
And template style:
ext/styles/all/tamplate/event/viewtopic_body_postrow_post_content_footer.html:

Code: Select all

Test: {L_TEST_LANG}
Why is the "{L_TEST_LANG}" not load from language file?

PS. If I add manualy {TEST_LANG} to language/en/viewtopic.php it works correct.
PS2. I have another langs in test.php and they load to ACP every time, just in this one case not.
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Language not load

Post by david63 »

Trubs wrote: Sat Oct 06, 2018 2:55 pm Why is the "{L_TEST_LANG}" not load from language file?
Are you actually loading that language file anywhere?

As templating is moving towards Twig sytax you would be better off creating your extension with that syntax.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
Trubs
Registered User
Posts: 6
Joined: Thu Oct 04, 2018 7:03 pm

Re: Language not load

Post by Trubs »

I found it and use Twig sytax. Now works correct. Maybe before I made some mistake.
Post Reply

Return to “Extension Writers Discussion”