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 7049231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:59:17+00:00 2026-05-28T02:59:17+00:00

Based on the below article, I was able to internationalize my CakePHP application to

  • 0

Based on the below article, I was able to internationalize my CakePHP application to certain extent –

http://puskin.in/blog/2010/08/cakephp-manage-multiple-language-in-application/

I want to extend this functionality and provide the ability where user can save the preferred language in his User profile. And everytime the user logs in, I want to use the preferred language and display the content of the site in that language. Ex – Facebook language setting. As soon as you change the language, the static content in the website is changed to that language.

Also, I have some static data like look-up information for drop-downs. How should my table design be in order to support i18n.

Any code snippets or ideas?

  • 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-28T02:59:17+00:00Added an answer on May 28, 2026 at 2:59 am

    Having a user language preference setting is trivial. Just add a field language to the user table and allow the user somewhere to set a value to it. In your app, you set the default language in core.php using Configure::write('Config.language', 'eng') and override it someplace else, best in the AppController::beforeFilter:

    public function beforeFilter() {
        if ($this->Auth->user('language')) {
            Configure::write('Config.language', $this->Auth->user('language'));
        }
    }
    

    Now all of Cake’s L10n functionality will output content in the user’s selected language.

    If you need any additional language logic that’s not covered by Cake, you might have to implement it yourself. I’d suggest you open a new specific question about specific concerns you have. Generally, you will base any custom language logic on the value in Configure::read('Config.language'). If you have, say, products with descriptions in multiple languages, you can have a Product hasMany Description relationship, where each Description has a language attribute which you filter by.

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

Sidebar

Related Questions

I've been evaluating technology stack for developing a social network based application. Below are
Based on this article I wanted to create a similar alias (flow described below).
I'm going to guess that the answer is no based on the below error
The method below called UserCanAccessThisPage is based on the following logic: each user and
I have the below code, which iterates over a list based on a custom
EDIT 2 Okay, based on the advice on the answers below I eliminated my
I have a drop down box and some text input fields below it. Based
UPDATE: Solved. Thanks BusyMark! EDIT: This is revised based on the answer below from
Based on several good articles I have been able to successfully create a few
I was reading the following article: http://msdn.microsoft.com/en-us/magazine/cc817398.aspx Solving 11 Likely Problems In Your Multithreaded

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.