Welcome Guest, Not a member yet? Register   Sign In
multilingual CRUD library setup in CI
#1

[eluser]Bramme[/eluser]
Hi guys

Rather lengthy post coming up, but I'd like to discuss this with you guys.

The company I work at uses it's own PHP framework and has some cool features that I'd like to implement in CI.

One of these is the CRUD library: we have a library/database setup that stores database table field information (conveniently named FieldInfo). For example, it stores the field type (text, textarea, hidden field, select, checkbox...), the field name in 5 different languages etc.

We also have a method that builds the forms, based on FieldInfo with the correct <input type='' />'s, correct language etc... Another method builds an html table, displaying the data stored in the database. Each database table also has a TableNameViewState table. In the viewstate table, we keep track of how many and which columns are shown in the datatable, sorting order etc, so when you log out, it will display the same way when you return.

This makes a very powerful and flexible basis to build applications on, but it still has some limitations. I would like to create something similar in CI with libraries and methods, but include some of CI's own magic and make that extra bit better.

For example: our own system only allows support for 5 languages, simply because we have 5 fields in the FieldInfo table "NameNL", "NameEN", "NameFR" etc... Ideally, I would like a system that could support as many languages as I'd like.

I was thinking of going with a 3-tables-per-table setup in the database: one table that holds the actual data, a viewstate table (as explained) and a third table that stores fieldname translations. Or maybe keep the 2 table setup and have, next to FieldInfo a FieldTranslations table.

Any insights from you guys? How would you handle it?


Messages In This Thread
multilingual CRUD library setup in CI - by El Forum - 09-18-2010, 07:19 AM
multilingual CRUD library setup in CI - by El Forum - 09-18-2010, 10:55 PM
multilingual CRUD library setup in CI - by El Forum - 09-19-2010, 01:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB