ElkArte Community

Extending Elk => Addons => Addons ideas and questions => Topic started by: ahrasis on August 07, 2014, 10:52:27 am

Title: What is Modifications.english.php replacement file?
Post by: ahrasis on August 07, 2014, 10:52:27 am
I know that we can create our own language file for our mod. But I do not think it is necessary for all, unless it is a big mod that requires a lot of strings. So, as the topic stated, what is Modifications.english.php replacement file?
Title: Re: What is Modifications.english.php replacement file?
Post by: Adrek on August 07, 2014, 11:09:30 am
It's Addons.english.php
Title: Re: What is Modifications.english.php replacement file?
Post by: ahrasis on August 07, 2014, 11:38:35 am
Thanks. I was looking up and down for that. Forgetting it is renamed as addon here. :)
Title: Re: What is Modifications.english.php replacement file?
Post by: Joshua Dickerson on August 07, 2014, 01:37:45 pm
With all of the hooks that are now available, this should now be considered legacy. The mod should just include their own language file with a hook whenever necessary.
Title: Re: What is Modifications.english.php replacement file?
Post by: ahrasis on August 09, 2014, 11:24:39 pm
I don't see the need to create all that for a small mod, really. Long line of coding should depends a lot on forum owner. If it can be done via shorter codes and less files, why one should bother with long ones. Issue of mods' conflict will still be there whether a mod is created by a hook or otherwise. Where's the fun in coding if you didn't have the freedom of choice in doing it for your own forum?
Title: Re: What is Modifications.english.php replacement file?
Post by: emanuele on August 10, 2014, 11:00:37 am
Of course you have the choice of doing changes the way you want. ;)
Of course, using "another file" or using "hooks" does have advantages. nods
I myself don't like to have to create a file just for one line of a language string I'd need. But, I do, because install and unisntall is much easier (at least I find easier to just add a require-file in package-info instead of having to create a "modifications.xml" and write the xml, but I'm weird, I know :P) and because for the way I write and test mods (I have a weirdly complex setup lol).
Title: Re: What is Modifications.english.php replacement file?
Post by: Spuds on August 10, 2014, 09:03:50 pm
I've done them both ways, but I still have the tendency to use the addon language file when I just have 1 or 2 txt strings to add. 

Using the addon language file is also nice since its loaded for you, vs having to add a loadLanguage(bla) ....

Anyway, point is do what makes you happy, thats why both ways work ;)
Title: Re: What is Modifications.english.php replacement file?
Post by: emanuele on August 11, 2014, 12:39:10 pm
Quote from: Spuds – Using the addon language file is also nice since its loaded for you, vs having to add a loadLanguage(bla) ....
^^ This is a good point, /me wonders if an "autoloadlang" settings somewhere may... O:-)
Title: Re: What is Modifications.english.php replacement file?
Post by: Joshua Dickerson on August 12, 2014, 06:03:47 pm
You can always change your own forum, but the direction 'customizations' are trying to move is to make it possible to do things without editing files. Editing files is a huge source of issues.