0
votes

My table header look below

<th scope="col"><?= $this->Paginator->sort('name')?></th>

After generate POT file 'name' has not generate 'msgid' and 'msgstr'.

I have tried like below code but result is same.

<th scope="col"><?= __($this->Paginator->sort('name')) ?></th>

How I will prepare it before POT file generate ?

2

2 Answers

0
votes

You can write your label like

<th scope="col"><?= $this->Paginator->sort('name',__('Name')) ?></th>
0
votes

The name of the key in sort function is used to sort the recordset. You cannot use it to generate 'msgid' and 'msgstr' in your POT file.

You can generate msgid and msgstr simply by defining it elsewhere like

<? = __('name') ?>;

PaginatorHelper::sort($key, $title = null, $options = array())

For your reference: https://book.cakephp.org/2.0/en/core-libraries/helpers/paginator.html