I have two languages and I save the data depends on I 18n.
the English saved in a table and the transition saved in I 18n
when I search for a specific word in the translate table,
there is no any result
I see this code
if ($this->request->is([‘post’, ‘put’])) {
I18n::setLocale('eng');
$data = $this->request->getData();
$products = $this->Products->find('all')
->Where(['Products.name LIKE' =>'%'.$data['product'].'%'])->limit(10)
->toArray();
$this->set('products', $products);
$this->set('data', $data);
$this->set('title', __('Search For :').$data['product']);
}
There are data end every thing ok ,