Multi language Error

Hello, I just added the setup for multi language support which is described on this page (http://getkirby.com/docs/languages/setup) and immediately I’m got the following error:

Fatal error: Cannot redeclare class Pages in /Developer/Project/kirby/branches/multilang.php on line 6

How can I fix it?

Could you share your language setup from /site/config/config.php?

This is my language setup:

c::set('language.detect', true);

c::set('languages', array(
  array(
    'code'    => 'en',
    'name'    => 'English',
    'default' => true,
    'locale'  => 'en_US',
    'url'     => '/',
  ),
  array(
    'code'    => 'es',
    'name'    => 'Spanish',
    'locale'  => 'es_ES',
    'url'     => '/es',
  ),
));

That looks alright. What PHP version are you on and what version of Kirby are you using?
And are you using any additional plugins, fields, field methods?

Thanks for your time, I’ve fixed the problem.

In my config.php file, before the language setup. I did a custom configuration

c::set('site.api.url', site()->url() . "/api");

So I put the language code before this line and it works perfectly.

I think that the function site() declares automatically the Page and Pages clases causing the issue.