Skip to content

Instantly share code, notes, and snippets.

@jlamim
Created August 16, 2016 01:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlamim/4952c35814e2c404e4c98403f20d36ac to your computer and use it in GitHub Desktop.
Save jlamim/4952c35814e2c404e4c98403f20d36ac to your computer and use it in GitHub Desktop.
Aplicações multi-idioma no CodeIgniter - hooks.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
//define o hook que será executado após a execução do método __construct
//de cada controller, para que o controle do idioma seja feito de maneira
//automática
$hook['post_controller_constructor'] = array(
'class' => 'LanguageLoader', //define a classe
'function' => 'initialize', //define o método a ser executado
'filename' => 'LanguageLoader.php', //define o nome do arquivo
'filepath' => 'hooks' //define o diretório onde o arquivo está
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment