I've modified gettext.erl too add the function callback_mod/0 that tries to get the name of the callback module from the application's environment and defaults to gettext_server if the configuration key has not been set. I also changed gettext_sup.erl to use this function when initializing the supervisor instead of hardcoding the value of the callback module.
The reason for this change was to be able to set the gettext directory and default language from the app.config file of the application that uses gettext instead of having to use environment variables from the OS shell or having to directly instantiate gettext's supervisor from my application.
Please let me know if you need me to make additional changes to accept this patch.
I've modified
gettext.erl
too add the functioncallback_mod/0
that tries to get the name of the callback module from the application's environment and defaults togettext_server
if the configuration key has not been set. I also changedgettext_sup.erl
to use this function when initializing the supervisor instead of hardcoding the value of the callback module.The reason for this change was to be able to set the gettext directory and default language from the
app.config
file of the application that uses gettext instead of having to use environment variables from the OS shell or having to directly instantiate gettext's supervisor from my application.Please let me know if you need me to make additional changes to accept this patch.