Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [CakePHP] miedzynarodowe linki
kicaj
post
Post #1





Grupa: Zarejestrowani
Postów: 1 640
Pomógł: 28
Dołączył: 13.02.2003
Skąd: Międzyrzecz/Poznań

Ostrzeżenie: (0%)
-----


app_helper.php:
  1. <?php
  2. class AppHelper extends Helper {
  3.        
  4.    function url($url = null, $full = false) {  
  5.        if(!isset($url['language']) && isset($this->params['language'])) {  
  6.            $url['language'] = $this->params['language'];  
  7.        }      
  8.  
  9.        return parent::url($url, $full);  
  10.    }  
  11. }
  12. ?>


router.php:
  1. <?php
  2. Router::connect('/:language/:controller/:action/*',
  3.    array(
  4.        'language' => 'pl'),
  5.    array(
  6.        'language' => 'pl|en|de|fr|da|ru'));
  7. ?>


... i tworzy linki w postaci: localhost/cos/tam/language:pl

Pytanie: Jak stworzyc by wszystkie linki byly tworzone automatycznie (wg wybranego jezyku), wg postaci: localhost/pl/cos/tam ?
Go to the top of the page
+Quote Post

Posty w temacie
- kicaj   [CakePHP] miedzynarodowe linki   4.03.2009, 23:58:46


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 10:19