Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3351844
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:57:28+00:00 2026-05-18T01:57:28+00:00

I have an application done with cakephp, and I have i18n done on the

  • 0

I have an application done with cakephp, and I have i18n done on the databse, following the instructions on the cakephp book. The thing is that on the table at the index view, I can’t sort by the fields that are translated. The field’s don’t actually exist on the database, so here is where I suppose the problem comes, but I can insert data on the field, so the i18n is working properly.

I’ve tried several ways of setting the paginator, but none work.

For example, I’ve tried:

Paginator->sort('Name','name');
Paginator->sort('Name','I18n__name');
Paginator->sort('Name','I18n__name.content');

As I see, on the queries, it fetches the field refering to it as I18n__name.content’, so I thought this would work, but it doesn’t.

Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T01:57:28+00:00Added an answer on May 18, 2026 at 1:57 am

    I’ve finally found it. I think this should to work out of the box in cakephp. But until they add this, there is a way to make it work.

    On the paginatro use the form:

    Paginator->sort('Name','I18n__name.content');
    

    And then, the only thing that needs to be done is add the following function in the model.

    function hasField($fieldName) {
        if (parent::hasField($fieldName))
            return true;
        else
            switch ($fieldName) {
                case "content":
                    return true;
                default:
                    return false;
            }
        return false; 
    }
    

    And that’s it, now the fields that are translated can be ordered in a paginated table.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I self-sign an iPhone application using Xcode? I have done the following:
I have problem with SwingWorker and it's done() method. I have an application that
I have application that has to check multiple data from user table, in order
I have an application written using the M-V-VM approach. The data access is done
I'm trying to start unit testing on my application (should have done so from
What needs to be done to have your .NET application show up in Window's
I have question related to what is done in SMS application is if i'm
I have application that makes different queries with different results so the caching in
I have application that is connecting to the DB and if I enter incorrect
I have an application that I've been tasked with cleaning up after. The application

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.