Welcome Guest, Not a member yet? Register   Sign In
Frontend Language Files Editor for CI 2.0
#1

[eluser]Ellli[/eluser]
Hello All,

I have created an interface for editing language files and I decided to share it with you. I have rewritten code in the first version and adapted to the Codeigniter 2.0.x

The basic idea was to create list of languages based on folders structure, and possibility to create new files or copy to other languages.

More details and package can be found here.

Suggestions/comments are welcome :o)
#2

[eluser]Maglok[/eluser]
A little thread resurrection, but I figured it is worth it.

This editor is not bad at all. I like how automatic it is.

PROs
- Easy to use
- Small footprint
- Backup features
- Full CRUD functions

CONs
- Had to add csrf fields to most forms to get the security module to allow it
- Database required (we run an application that does not have one)
- No support for arrays in language files (think option lists for dropdrowns for example)
- Any layout the language file had/has is lost when writing the file
- It doesn't handle linebreaks very well
- It doesn't write stuff like 'é' away without some conversion errors (though this could be my setup as well!)

I would consider using this for some projects. Unfortunately not for the one we have need of it the most, which needs array language options and retained layout in the language files.

The CI community desperately needs a nice editor for the language files that has it all covered, without database. Smile Good job regardless!
#3

[eluser]Ellli[/eluser]
Hi,
thank you for your suggestions.

I forgot about arrays in language files, because I never had to use it (o; but that's not an excuse (o;

If I will have some free time, I will implement some of this features.
The first version was based on keys stored in file. Every method has some +/- so I will just give a possibility to choose between keys in db/keys in files (o;

About the "layout" of the file. The file is written every time, so if you make some code formatting (indent, spaces) it will be lost next time you save the file. What I want to say, for me it's obvious that layouts, comments are lost when u use some kind frontend file editor (o; Especially when you don't "read" file but include/require and then operate on array.

Sorry if it's not clear (o; I just woke up and my coffe is cold (o;
#4

[eluser]Maglok[/eluser]
Cold coffee is indeed evil. I swear by tea myself.

I would be very interested in an option that allows either file or database use. Normally I would go for the database, but to add a database to an application that doesn't have one yet seems a bit overkill to me.

You make perfect sense about the layout, though we got a sort of specific setup. We are the developers and several people need to make language changes. The thing is that we need to have comments there for them to see what fields they are actually editing and to limit them a little. If we do not do that, they will get confused. You make perfect sense, but we got a specific situation at the moment.

I would mind a lot less in a project where only we touch the language files.

Good luck with that coffee.
#5

[eluser]Ellli[/eluser]
ok, I got your point with that comments. And I can see simple solution for that when db is use (by creating another column where comments for keys are stored), but when you use files it would have to be an additional file for storing that comments (i think one for all, it depends how long and how many files etc etc). hmmm. I will think about that. I won't lie, I could use comments for language keys in project I'm working on right now ;o) Maybe not in this moment, but in the future. So, probably this feature will show up soon. ;o)


#6

[eluser]Maglok[/eluser]
I will keep an eye on this project in that case.

Here is a bit of how some of our language files look (for example we have one with 21 language files atm, so an editor would indeed be handy)

Code:
// Activity 1 field: Name, options, hint, error
$lang['form_activity_1']       = 'Activiteit';
$lang['form_activity_1_options'] = array('Maak een keuze' => 'Maak een keuze',
            'Congres' => 'Congres',
            'Cursus' => 'Cursus',
            'Lezing / colloquium' => 'Lezing / colloquium',
            'Lunch' => 'Lunch',
            'Studentenactiviteiten' => 'Studentenactiviteiten',
            'Vergadering' => 'Vergadering',
            'Workshop' => 'Workshop',
            'Overige' => 'Overige');
$lang['form_activity_1_hint']  = 'Kies een van de gegeven activiteiten';
$lang['form_activity_1_error'] = 'U moet een van de aangegeven activiteiten kiezen';

It's dutch language, but that shouldn't matter. Smile




Theme © iAndrew 2016 - Forum software by © MyBB