如何在印度语中创建网站 - 卡纳达语

时间:2011-07-10 14:10:43

标签: php content-management-system multilingual

我想建立一个有两个版本的网站。 英语,印度语Langauge(卡纳达语)。 该网站应在整个网站上具有相同的设计,创意,结构和数据。

此网站内容繁重,需要 cms 和相关的语言编辑器。我是一个php编码器,我可以使用任何免费的cms - wordpress,drupal,joomla。我听说在我的共享服务器上安装字体以支持卡纳达语。我想这些字体应该支持所有平台(windows,mac,linux和移动网站。)

任何人都可以帮助我。是否有任何免费的小部件,插件可以安装在我的共享服务器上,并帮助以预期的语言显示我的网站。

4 个答案:

答案 0 :(得分:0)

Joomla有joomfish插件。这是好的和广泛的。值得研究。

答案 1 :(得分:0)

您应该为您的语言设置正确的字符集,我认为utf-8将适合您

header("Content-Type: text/html; charset=utf-8");

在脚本顶部

答案 2 :(得分:0)

你可以使用typeface.js为英语,印度语Langauge(卡纳达语) 简单又好看! get your typeface.js

答案 3 :(得分:0)

嗨,很久以前我已经在php中完成了kannada网站,我在网站中使用了定义菜单和非动态内容,以及将数据插入到DB中的数据将它们转换为“实体”

你可以使用这个功能

function ascii_to_entities($str)
{
    $count  = 1;
    $out    = '';
    $temp   = array();

    for ($i = 0, $s = strlen($str); $i < $s; $i++)
    {
        $ordinal = ord($str[$i]);

        if ($ordinal < 128)
        {
            /*
                If the $temp array has a value but we have moved on, then it seems only
                fair that we output that entity and restart $temp before continuing. -Paul
            */
            if (count($temp) == 1)
            {
                $out  .= '&#'.array_shift($temp).';';
                $count = 1;
            }

            $out .= $str[$i];
        }
        else
        {
            if (count($temp) == 0)
            {
                $count = ($ordinal < 224) ? 2 : 3;
            }

            $temp[] = $ordinal;

            if (count($temp) == $count)
            {
                $number = ($count == 3) ? (($temp['0'] % 16) * 4096) + (($temp['1'] % 64) * 64) + ($temp['2'] % 64) : (($temp['0'] % 32) * 64) + ($temp['1'] % 64);

                $out .= '&#'.$number.';';
                $count = 1;
                $temp = array();
            }
        }
    }

    return $out;
}

或定义方法

define('lang','ಕನ್ನಡ');

link - http://www.jayashomeshop.com/?language=kn

相关问题