Resolved Bug

This bug has been marked as resolved.

"Layout" naming issue

Permalink 7 0 Browser Info Environment
This is about line 53 in /concrete/models/layout.php

The naming of "Layout".

public function getLayoutNameTxt(){ return t('Layout'); }

This is not the good practice since this naming of the layout will be use for the CSS class eventually.

Using multibytes name for CSS class is not really a good practice.

So we kinda decided to take t() off, and use only "Layout" in English.

However, if we take it off, we need to write converter to convert the name of the layout in the table.

This is the major holds-up for our Japanese version now.


Status: Resolved
katz515 replied on at Permalink
We are going to release


And this is the upgrade script


 * @access private
 * @package Helpers
 * @category Concrete
 * @author Tao Sasaki <[email protected]>
 * @copyright  Copyright (c) 2003-2011 Concrete5. (
 * @license     MIT License
defined('C5_EXECUTE') or die("Access Denied.");
class ConcreteUpgradeVersion54111Helper {
   public function run() {
      $db = Loader::db();
      // Changing the layout without t()
        $db->Execute("UPDATE Areas SET arHandle = replace(arHandle,'".t('Layout')."','Layout') WHERE arHandle LIKE '%: ".t('Layout')."%'");
Mnkras replied on at Permalink
i see what you mean,
Tao replied on at Permalink
To specify the css class name in multi-byte characters have no problem specification, but may be causing the problem.
katz515 replied on at Permalink
Adding Tao's note: One Japanese user pointed out that W3C allows to use Japanese (in Unicode) as the part of CSS class name.

However, we may face the character encoding issue...

Most of all, the serious issue is that you have a chance to lose the layout when switching the language.
katz515 replied on at Permalink
I made the thread to Internationalization section.
syzlmr replied on at Permalink
As you say.

I also don't understand the reason to keep using t() for getLayoutNameTxt().

If I build my own site with English version at beginning, and install other language package later.

In that case, I think I will lose all my layout too. Except, the translator didn't translate the t('Layout'),or I have to change my database.

I agree it's a really Big problem for people using foreign languages.
andrew replied on at Permalink
Confirmed. Removing the t()

concrete5 Environment Information

All versions upto

Browser User-Agent String

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv: Gecko/20101203 Firefox/3.6.13