How to extend dictionary file?

35 views
Skip to first unread message

sineverba

unread,
Jun 15, 2018, 8:33:09 AM6/15/18
to Fat-Free Framework
Hi to all,
I'm developing a webapp with F3, that user can extend writing own module/class/plugin.

I want introduce a base dictionary file for ita and eng.

Because I update that webapp, user can make a simple `git pull` to get last version, without overwriting his file.

So, it is not an option "permit" to use "my" it.php or en.php file.

How can I extend dictionary file to permit user to add their traduction and not overwriting them during an update?

I'm hope I'm clear, thank you!

ikkez

unread,
Jun 15, 2018, 10:08:45 AM6/15/18
to f3-fra...@googlegroups.com
hi... as far as I know, you can use add multiple paths to LOCALES var.. so when set  LOCALES = core/lang/,plugins/plugin-a/lang/,plugins/plugin-b/lang/
you should be able to extend your base language dictionary pretty easy.

another option: since language files can be php files, you can also run a custom script there, which collects all your language keys from multiple locations and just return the finished array.
Reply all
Reply to author
Forward
0 new messages