prestaconcept / PrestaSonataGedmoDoctrineExtensionsBundle

Gedmo integration in Sonata Admin : Translatable...
http://prestaconcept.github.io/presta-gedmo-doctrine-extensions/index.html
3 stars 7 forks source link

variable "locales" does not exist #2

Closed fatmah closed 10 years ago

fatmah commented 10 years ago

hello, in "locale_switcher.html.twig" variable "locales" does not exist. thank you

nicolas-bastien commented 10 years ago

Hi you just have to add it in your parametres.yml like :

locales : [fr, en, de]

I will add a doc after my holiday

fatmah commented 10 years ago

Hi,happy new year, no I have this param in my parameters.yml this exception appear when I try to edit a block from my admin thank you

fatmah commented 10 years ago

Hi , the correct variable name is "presta_sonata_admin_extended_locales" it works for me

nicolas-bastien commented 10 years ago

Hi,

Anyway there is a bug there.

First it should not appears in the block edition as locales is set at the page level. Sonata new block events as been made so I should refactor this part to have some thing cleaner.

But I maintains the "locales" parameter is the solution, I guess you don't have the last version of the bundle.

Just have a look there to checkout :

https://github.com/prestaconcept/PrestaSonataGedmoDoctrineExtensionsBundle/blob/master/Resources/views/CRUD/locale_switcher.html.twig

In 2014 I'll do my best to tag and make proper documentation of all this bundles

Nico

On 2 January 2014 16:14, fatmah notifications@github.com wrote:

Hi , the correct variable name is "presta_sonata_admin_extended_locales" it works for me

— Reply to this email directly or view it on GitHubhttps://github.com/prestaconcept/PrestaSonataGedmoDoctrineExtensionsBundle/issues/2#issuecomment-31458396 .

fatmah commented 10 years ago

Hi, no i am using the last version

bvleur commented 10 years ago

If it's any help:

I don't understand enough of this yet to suggest a fix for this.

nicolas-bastien commented 10 years ago

Hi, so finally I have time to do this.

So as I said presta_sonata_admin_extended.locales are for admin translations and locales for the front (so your entities too)

What you have to do is to make 'locales' global for twig like this :

twig:
    global:
        locales: %locales%

I will make a documentation for this and correct symfony-prestacms too.

Sorry for being so long....