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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:24:17+00:00 2026-05-27T06:24:17+00:00

We are developing a multi-lingual application with Yii and are setting the language of

  • 0

We are developing a multi-lingual application with Yii and are setting the language of the website with the Yii::app()->language setting. The problem is that when we switch the language in this way, all of Yii’s built-in error messages also change to display in that language. This makes debugging a bit irritating as I have to set the language to English and then reload the page to read the error.

I’ve tried using Yii::app()->souceLanguage = ‘en_US’, but this doesn’t seem to make any difference to the error messages. Any idea how to set up Yii to display the site’s content in one language (using Yii::t()) and the error messages in another?

  • 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-27T06:24:18+00:00Added an answer on May 27, 2026 at 6:24 am

    You can override CPhpMessageSource::loadMessages() with something like following:

    protected function loadMessages($category, $language)
    {
        if ($category === 'yii') {
            return array();
        } else {
            return parent::loadMessages($category, $language);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a multi-lingual website. I am determining the requested language via a
I am developing a multi-langual website. Language variables (phrases/word translations) will be entered in
I am relatively new to C#/.Net. I'm developing a desktop application that requires multi
I am developing a multi threaded application, that uses both threads and Async tasks
i'm developing a multi-platform C++ fuzzing application. The app spawns a child process and
We are developing a multi-tenant application using NHibernate where all tenants share the same
I am developing a multi-lingual site with Plone. I want to have one language
I'm currently developing a multi-tiered application, using MVC3 and Spring.NET all of which is
I have a multi-tenancy application that I am developing and I'm nearly there. Currently
I'm developing a HTML5 application that uses jQuery. I want to make it multi

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.