Info Panel
Roll it!   ⇔

This is: Page num 2 based controller (MVC) multi language

This tutorial is built in parts, it is imperative to start from the begining, so it will be easier to understand the processes on this framework, since every part rely on the previous part. This demonstration is based on the files designated on "Files in use" in the middle of this page. to complete our knowledge it is recommended to look for the documents on limbercode.com

Another way we can replace language test's is using the "translate" function. If we will look at this page code (file number 2) we can see the translation happens on this line: $textForSecondLine = $this->trans->T("All reques.... to achieve the text replacing we also have to edit the text file in the desired language (file number 8). when we switch a page language the text will be replaced as well.

Files in use: (not including template files)

1 - View (a must): architecture/application/views/firstPageBasedController/pageNum2BasedController.php

2 - Controller (a must): architecture/application/controllers/firstPageBasedControllerController.php

3 - Model (optional): architecture/application/models/firstPageBasedControllerModel.php

4 - Model data (db like) (optional): source/data/demonstrationData/main.php

5 - Css (optional): public/css/demo.css

6 - Dependency (optional): architecture/application/controllers/dependencyDemo.php

7 - Notification (optional): source/text/notifs/en/demo.php

8 - Translation (optional): source/text/translations/xx-xx/demo.php

Navigate:

homePage - Home page

firstPageBasedView - First page based "view"   firstPageBasedViewMu - For multi language support

pageNum2BasedView - Page number 2 based "view"   pageNum2BasedViewMu - For multi language support

firstPageBasedController - First page based "controller"   firstPageBasedControllerMu - For multi language support

pageNum2BasedController - Page number 2 based "controller"   pageNum2BasedControllerMu - For multi language support

Info Panel
Roll it!   ⇔