MyBB Community Forums

Full Version: plugin creating language files on the fly
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a large plugin/module that utilizes user defined words. the new admin module creates user defined tables, so field names need associated language variables for proper display to the end users.

would the best method to create the new files be to make new files 'on the fly' in \inc\languages\ for each language folder present? I can dump the field names as the text so they are not null/empty and have the admin edit them via the built-in language edit functionality of the ACP

if the user edits the field list in my module, i can delete terms or add new ones with the default names as if it was a new file.

of course this is all dependent on having write access and the host allowing PHP to write files to the account.

am I over thinking this?

should I just require the admin to create the language files themselves? I can add a module option to generate a template language file in the ACP that the admin can copy/paste, edit and upload on their own

once a table is setup, the admin should have little need to edit the fields again. however, admins are allowed unlimited tables, so for each table they need to go through this process unless they use an existing table definition

or, do I let the admin define the words and simply use them regardless of the user selected language (like how a forum name works, once its typed out in the ACP, its that way for everyone no matter the language)

the only reason i am working with user defined tables is that they are then searchable by field. can't so that if i simply store the data in an encoded string.