Where to put Module css, javascript, images?

According to Creating Extensions in the Yii Documentation, under Module right at the bottom of the page, it says that css, javascript, and images resource files should be distributed together with a module, right?

1) So does this mean if I have a module called “Forum” which is a sub directory under protected/modules, that my resource files should be another sub directory within the forum directory, even if Forum is not a 3rd party extension?



protected/modules/forum/css


protected/modules/forum/javascript


2)

How does Yii handle the multiple CSS and javascript inclusions?

3) How would the translation of Modules be handled?



<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css" />


<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />


modules/your_module/css/main.css

modules/your_module/css/form.css

etc…

  1. If the module is only an internal division of a big project, you don't need to store resource files under the module directory. If you do so, you would need to publish them, which takes extra time.

  2. Not sure about your question.

  3. Again, if the module is internally used, you don't need specific handling of module messages since they are centrally controlled by the application. If you want to release a module as an extension with messages, you need to register a new message source in module's init method.

Quote

2)

How does Yii handle the multiple CSS and javascript inclusions?

Nevermind nr 2 qiang, I think I just answered myself