# Plugin extension?

**URL:** <https://www.ruby-forum.com/t/plugin-extension/119778>\
**Category:** Rails\
**Created:** [November 10, 2007, 12:09pm UTC](https://www.ruby-forum.com/t/plugin-extension/119778 "2007-11-10T12:09:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/35a633/32.png) [@jamal](https://www.ruby-forum.com/u/jamal)\
**Post date:** [November 10, 2007, 12:09pm UTC](https://www.ruby-forum.com/t/plugin-extension/119778/1 "2007-11-10T12:09:07Z")

</div>

Hello everyone,

* * *

## Gibberish is internationalization plugin. [http://errtheblog.com/post/4396](http://errtheblog.com/post/4396)

I want to change the way Gibberish loads the yml files, since the  
languages files becomes to big, i want to split them so that every  
controller have their own translating file.

This is how language files are located now.

lang/  
en.yml  
da.yml

I want to be able to do this 🙂

lang/  
en/  
navigation.yml  
home.yml  
user.yml  
da/  
navigation.yml  
home.yml  
user.yml

HomeController will use home.yml  
UserController will use user.yml

…and there should be opportunity to load other language file if needed  
like this 🙂

class HomeController \< ApplicationController  
language :files =\> [:home, :user]  
end

My question is how to debug the plugin, I’m not able to use the  
logger.info or put in the module, I get errors ☹

def language\_files  
logger.info “what”  
puts “test”  
@@language\_paths.map {|path| Dir[File.join(path, ‘lang’,  
‘\*.{yml,yaml}’)]}.flatten  
end

Thanks for reading, and thanks for any response 😃

//Jamal
