Language Files

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Anti-Spam Guide
Post Reply
User avatar
durangod
Registered User
Posts: 709
Joined: Tue Nov 03, 2009 1:26 pm
Name: Dave

Language Files

Post by durangod »

Hi, this is kind of half way between off topic and phpBB related so i thought i would error on the side of phpBB because it does relate to it.

I am currrently building a script (non forum related) and i like the idea of having language hard files like phpBB does for the language keys, rather than put them all in the (database) and code a UI for them.

So with that i have set it up so that there is a special flat file called language_override. It allows a admin to add the language key he wants to change and then put in his own value, and that will override the value in the main en english file. This will keep admins from editing main language files.

The problem i find is that trying to explain to someone how to properly edit a php language file array. If you have ever tried to explain that to an admin that has 0 coding experience, its quite involved and time consuming.

So that gets me thinking about maybe i should just put the language in a database and build a UI and then the admin can just use my UI to edit or change the key lang values, then i wont have to explain how to do it.

That brings me to my quesiton regarding phpBB. Seeing how phpBB uses flat language files and has done so for a very long time, and who better to ask. And that its probably likey that the team has discussed the DB option at some point.

If you had to start over and re-code phpBB from the ground up, would you still go with flat file or would you do the database UI option for the language key values?

Thanks :)

User avatar
david63
Registered User
Posts: 17420
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Language Files

Post by david63 »

A db approach is perfectly possible but has many drawbacks over the flat file approach.

It is difficult to maintain with multiple languages. It would use a large amount of db space. It would need to hold most of the data in memory/cache to minimize db queries. It would make translators, and extension developers, life difficult and on top of all that the whole language handling code would need to be re-written.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
durangod
Registered User
Posts: 709
Joined: Tue Nov 03, 2009 1:26 pm
Name: Dave

Re: Language Files

Post by durangod »

Thanks david63 for the feedback... i have battled over all those concerns for about a week now and being middle of the road on user experience vrs my support experience. For now ill keep it in a flat file, i like that anyway which is why i did that in the first place. So thanks for helping me split the tie in my mind :)

Post Reply

Return to “phpBB Discussion”