xfra35 / f3-multilang

Create multilingual apps with this localization plugin for the PHP Fat-Free Framework
GNU General Public License v3.0
48 stars 13 forks source link

Can't add both /admin and /login to either global ignore list or exclusion for a lang #10

Closed zeon closed 8 years ago

zeon commented 9 years ago

Hi I am using fabulog and I can't seem to add both /admin and /login to the global ignore list, can you tell me how do I do that? Below's my config.ini:

menu = about, press, news, terms, privacy, contact, login, admin

[maps] @about : /about = Controller\About @press : /press = Controller\Press @news : /news = Controller\News @terms : /terms = Controller\Terms @privacy : /privacy = Controller\Privacy @contact_add : /contact/add = Controller\Contact->addContact @contact_alert : /contact/alert = Controller\Contact->alert @image_download : /download/@image = Controller\Press->imageDownload @login : /login = Controller\Auth->login @admin : /admin = Controller\Dashboard->main

[MULTILANG] global = terms, privacy, /admin/post, contact_add, contact_alert, image_download, login, admin

[MULTILANG.languages] en = en-GB, en-US, en tw = zh-TW, tw

[MULTILANG.rules.en] admin_create = /admin/@module/create contact_add = /contact/add contact_alert = /contact/alert image_download = /download/@image admin = false login = false

[MULTILANG.rules.tw] admin_create = /admin/@module/create contact_add = /contact/add contact_alert = /contact/alert image_download = /download/@image

xfra35 commented 9 years ago

What are you trying to achieve?

Since you've put login and admin in the "global" list:

In other words, those 2 routes are excluded from all languages (/en and /tw).

So the extra rules[1] which manually exclude those routes from the English language are useless.


[1] MULTILANG.rules.en.admin = false and MULTILANG.rules.en.login = false

zeon commented 8 years ago

Yes it supposed exclude but it's not and i get 404 when accessing both:

/login /admin

and all the pages under /admin

you can give it a try using fabulog.

xfra35 commented 8 years ago

Hi @zeon,

I've just made a quick test and it works fine. See here the changes applied to the original fabulog.

Of course, not everything is ready but we have:

Hope it helps.