简体   繁体   中英

F3 framework localization slows down website

I've just implemented f3 localization on a platform I'm working on and it slowed down the website a lot.

On the setup.ini:

PREFIX=lang_
LANGUAGE=en
CACHE=TRUE

And then, I've a en.php file in the dict folder:

<?php
return array(
    'word1' => 'First word',
    'word2' => 'Second word',
    'word3' => 'Third word'
);
?>

To display words, I use: (and both work perfectly)

{{ @lang_word1}}

or

$f3->get('lang_word1');

The en.php file has almost 900 words / sentences and it looks like f3 loads it in every request and then the website gets super slow.

Any tips?

Cheers

如何使用PHP GETTEXT进行翻译?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM