Thomas Varghese Thomas Varghese Thomas Varghese Thomas Varghese Thomas Maliackal

forex trading logo


Home Community ccBoard - Language Support Thai language translation
 Support Forum :: ccBoard - Language Support
Welcome Guest   [Register]  [Login]
 Subject :Thai language translation.. 2009-05-23 03:41:39 
prommart
Junior
Joined: 2009-01-16 04:47:28
Posts: 27
Location: Thailand
  

I translate thai language and make install file for ccBoard component 1.1RC and module 1.0RC.

Thank for ccBoard component.

Prommart Saelua



Attachments
 com_ccboard_1.1RC_language_pack_th.zip [9 KB] :: Thai language for ccBoard component 1.1RC
 mod_ccboard_latest_1.0RC_language_pack_th.zip [1 KB] :: Thai language for ccBoard lates module 1.0RC
 mod_ccboard_popular_1.0RC_language_pack_th.zip [1 KB] :: Thai language for ccBoard pupular module 1.0RC
IP Logged
 Subject :Re:Thai language translation.. 2009-05-23 05:28:34 
prommart
Junior
Joined: 2009-01-16 04:47:28
Posts: 27
Location: Thailand
  
A little change of component translate.

Attachments
 com_ccboard_1.1RC_language_pack_th.zip [9 KB] :: Thai language for ccBoard component 1.1RC
IP Logged
 Subject :Re:Thai language translation.. 2009-05-25 00:38:01 
thomas
Admin
Joined: 2008-12-13 17:16:30
Posts: 2,554
Location: Aluva, India
 

Hi,

Thanks I have updated to download section. Your efforts are really appreciated.

Thomas

 

IP Logged
Together we can make history :star:
 Subject :Re:Thai language translation.. 2009-06-18 16:16:12 
soso2k
Fresher
Joined: 2009-01-28 01:54:58
Posts: 8
Location

Hi,

 

Thanks so much for Thai translation for CC board..  I need your help cause I have problem wiht date format... please take a look on photo attached.

 

 

My site is www.thainews.hit.as

 

Any advice would be highly appreciated.

 

Thanks in advance..

IP Logged
 Subject :Re:Thai language translation.. 2009-06-18 16:51:46 
soso2k
Fresher
Joined: 2009-01-28 01:54:58
Posts: 8
Location

The problem is because I have one file in language folder to change date format from English style to Thai style.. I can't upload the file here.. but I copy script to shoow you...

 


<?php
/**
* @version        $Id: date.php 9966 2008-01-27 16:30:40Z willebil $
* @package        Joomla.Framework
* @subpackage    Utilities
* @copyright    Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
* @license        GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// Check to ensure this file is within the rest of the framework
defined('JPATH_BASE') or die();

/**
 * JDate is a class that stores a date
 *
 * @author    Johan Janssens <johan.janssens@joomla.org>
 *
 * @package        Joomla.Framework
 * @subpackage    Utilities
 * @since        1.5
 */
class JDateth_TH extends JDate
{
    /**
     * Unix timestamp
     *
     * @var     int|boolean
     * @access  protected
     */
    var $_date = false;

    /**
     * Time offset (in seconds)
     *
     * @var     string
     * @access  protected
     */
    var $_offset = 0;

    /**
     * Creates a new instance of JDate representing a given date.
     *
     * Accepts RFC 822, ISO 8601 date formats as well as unix time stamps.
     * If not specified, the current date and time is used.
     *
     * @param mixed $date optional the date this JDate will represent.
     * @param int $tzOffset optional the timezone $date is from
     */
    function __construct($date = 'now', $tzOffset = 0)
    {
        parent::__construct($date, $tzOffset);
    }

    /**
     * Gets the date in a specific format
     *
     * Returns a string formatted according to the given format. Month and weekday names and
     * other language dependent strings respect the current locale
     *
     * see manual #PHP_DATE  http://th.php.net/manual/en/function.date.php
     * @param string $format  The date format specification string (see {@link PHP_MANUAL#strftime})
     * @return a date in a specific format
     */
    function toFormat($format = '%Y-%m-%d %H:%M:%S')
    {
        $convNumber = true;
        $date = ($this->_date !== false) ? $this->th_THdate($format, $this->_date + $this->_offset,$convNumber) : null;
        return $date;
    }
    
    function th_THdate($format, $time,$convNumber)
    {
        $format = str_replace('%a', $this->_dayToString(date('w', $time), true), $format);
        $format = str_replace('%A', $this->_dayToString(date('w', $time)), $format);
        $format = str_replace('%b', $this->_monthToString(date('n', $time), true), $format);
        $format = str_replace('%B', $this->_monthToString(date('n', $time)), $format);
        $format = str_replace('%Y', $this->_yearToString(date('Y', $time), $convNumber), $format);
        $format = str_replace('%d', $this->_numToString(date('d', $time), $convNumber), $format);
        $format = str_replace('%h', $this->_numToString(date('h', $time), $convNumber), $format);
        $format = str_replace('%H', $this->_numToString(date('H', $time), $convNumber), $format);
        $format = str_replace('%i', $this->_numToString(date('i', $time), $convNumber), $format);
        return $format;
    }
    
    function _monthToString($month, $abbr = false)
    {
        switch ($month)
        {
            case 1: return $abbr ? JText::_('JANUARY_SHORT')   : JText::_('JANUARY');
            case 2: return $abbr ? JText::_('FEBRUARY_SHORT')  : JText::_('FEBRUARY');
            case 3: return $abbr ? JText::_('MARCH_SHORT')     : JText::_('MARCH');
            case 4: return $abbr ? JText::_('APRIL_SHORT')     : JText::_('APRIL');
            case 5: return $abbr ? JText::_('MAY_SHORT')       : JText::_('MAY');
            case 6: return $abbr ? JText::_('JUNE_SHORT')      : JText::_('JUNE');
            case 7: return $abbr ? JText::_('JULY_SHORT')      : JText::_('JULY');
            case 8: return $abbr ? JText::_('AUGUST_SHORT')    : JText::_('AUGUST');
            case 9: return $abbr ? JText::_('SEPTEMBER_SHORT') : JText::_('SEPTEMBER');
            case 10: return $abbr ? JText::_('OCTOBER_SHORT')   : JText::_('OCTOBER');
            case 11: return $abbr ? JText::_('NOVEMBER_SHORT')  : JText::_('NOVEMBER');
            case 12: return $abbr ? JText::_('DECEMBER_SHORT')  : JText::_('DECEMBER');
        }
    }

    function _yearToString($year, $abbr = false)
    {
        return $this->Convertnumber2thai($year+543,$abbr);
    }        
    function _numToString($date, $abbr = false)
    {
        return  $this->Convertnumber2thai($date,$abbr);
    }

////here convert to  number in Thai    
    function Convertnumber2thai($result,$abbr = false)
    {
         $thaiNumber = array ("๐", "๑", "๒", "๓", "๔", "๕", "๖", "๗","๘", "๙" );    
        $org_result = $result;
        for ( $counter=0; $counter <= 9; $counter++) {    $result = str_replace($counter, $thaiNumber[$counter], $result);    }
        return $abbr ? $result : $org_result ;
    }    
/// end convert number 2 thai
    
    function _dayToString($day, $abbr = false)
    {
        switch ($day)
        {
            case 0: return $abbr ? JText::_('SUN') : JText::_('SUNDAY');
            case 1: return $abbr ? JText::_('MON') : JText::_('MONDAY');
            case 2: return $abbr ? JText::_('TUE') : JText::_('TUESDAY');
            case 3: return $abbr ? JText::_('WED') : JText::_('WEDNESDAY');
            case 4: return $abbr ? JText::_('THU') : JText::_('THURSDAY');
            case 5: return $abbr ? JText::_('FRI') : JText::_('FRIDAY');
            case 6: return $abbr ? JText::_('SAT') : JText::_('SATURDAY');
        }
    }
}

I used Joomla 1.5.11 and ccBoard Version: 1.1 RC

 

 

Thanks for any advice in advance...

 

 

 

IP Logged
 Subject :Re:Thai language translation.. 2009-06-19 03:12:14 
thomas
Admin
Joined: 2008-12-13 17:16:30
Posts: 2,554
Location: Aluva, India
 

Hi,

Perhaps prommart  can help you out in this as he is a professional on Thai based Joomla sites.

Thanks

Thomas

 

IP Logged
Together we can make history :star:
 Subject :Re:Thai language translation.. 2010-08-02 03:10:16 
jeemkerry
Fresher
Joined: 2010-08-02 09:05:25
Posts: 6
Location

In google you can find many of online language translator who can directly translate that all language without any problem. So first of all you can select that language translator and then you can get that language translator application.

IP Logged
Page # 


Powered by ccBoard



Latest News

Latest Posts

More...


Popular Posts


Powered by Joomla!. Designed by: Joomla Template, url. Valid XHTML and CSS.

© 2008-2009 CODECLASSIC.ORG. All Rights Reserved.

) { echo