# Localization error when using FriendsOfCake/Search plugin

**URL:** <https://discourse.cakephp.org/t/localization-error-when-using-friendsofcake-search-plugin/9787>\
**Category:** Uncategorized\
**Created:** [October 7, 2021, 11:01am UTC](https://discourse.cakephp.org/t/localization-error-when-using-friendsofcake-search-plugin/9787 "2021-10-07T11:01:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![user\_looser](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/user_looser/32/2161_2.png) [@user\_looser](https://discourse.cakephp.org/u/user_looser)\
**Post date:** [October 7, 2021, 11:01am UTC](https://discourse.cakephp.org/t/localization-error-when-using-friendsofcake-search-plugin/9787/1 "2021-10-07T11:01:17Z")

</div>

Hello, I set up searching on my site according to the CakePHP CookBook - [Internationalization & Localization - 4.x](https://book.cakephp.org/4/en/core-libraries/internationalization-and-localization.html) and localization was working. Here are two screenshots:

This is page in English:

 ![en_edoro_people](https://canada1.discourse-cdn.com/flex029/uploads/cakephp/original/2X/2/2a675a7bffbd37ab163083eb4d607b80ed83dcac.png)

This is page in Slovak:

 ![sk_edoro_people](https://canada1.discourse-cdn.com/flex029/uploads/cakephp/original/2X/6/63202c87bec957ced60db5bf3cc6000d7f2fd32b.png)

Switching between languages was implemented using the GET method (default locale is sent as a parameter of GET FORM).

When I add search functionality using the FriendsOfCake/Search plugin, the site crashes on language change.

This is my AppController:

 ![app_controller.php](https://canada1.discourse-cdn.com/flex029/uploads/cakephp/original/2X/5/54912a8c8de9aa7cecd76f76c4ea8f2e3a94b084.png)

This is my index.php View template:

 ![people_index.php](https://canada1.discourse-cdn.com/flex029/uploads/cakephp/original/2X/b/ba3f331cfd1b959882d8a1e42b3bb1f71efa2790.png)

This is page running in default language and active search module:

 ![sk_edoro_people_search](https://canada1.discourse-cdn.com/flex029/uploads/cakephp/original/2X/a/ab73c12924d9453e76922a3a28bf50dd817d5521.png)

The site crushes when I switch the language:

 ![sk_edoro_people_search_change_en](https://canada1.discourse-cdn.com/flex029/uploads/cakephp/original/2X/c/ca4a868ca5a11f7cfa61e0e7d76b28d7b9a8329d.png)

This is the error:

 ![error](https://canada1.discourse-cdn.com/flex029/uploads/cakephp/original/2X/3/3fc7882838ccaac5b269105ce23b996ab56a5e5c.png)

Can please anybody help me, how to fix this issue?

Thank you.
