Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Add i18n (aka internationalisation and localization) to uri
  • I made an i18n feature for Fuel PHP. Just by extending the Uri class... See code: http://scrp.at/tL Copy code into: /app/classes/uri.php Add the following to the app bootstrap:
    Fuel\Core\Autoloader::add_classes(array(
     // Add classes you want to override here
     // Example: 'View' => APPPATH.'classes/view.php',
     'Uri' => APPPATH.'classes/uri.php',
    ));
    

    If someone has suggestions or knows how to do it better, please let it know on this topic.
  • You have to change in asset config:
    'url' => Config::get('base_url'),
    
    to
    'url' => '/'
    
  • Hi Mike Thanks for this Uri class, it works like a charm ! Is it possible to redirect to a splash page (to select the desired language) when no language is passed in the URL ? Currently it shows the page and uses the default language set in config. Thanks in advance !

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion