ThaiSEOBoard.com

พัฒนาเว็บไซต์ => CMS & Free Script => ข้อความที่เริ่มโดย: aeung ที่ 24 กรกฎาคม 2012, 17:09:16



หัวข้อ: Disqus comment system เปลี่ยนเป็นภาษาไทยอย่างไรครับ?
เริ่มหัวข้อโดย: aeung ที่ 24 กรกฎาคม 2012, 17:09:16
- ลองไปเปลี่ยนที Settings > General
Language : Thai แล้ว ก็ไม่ได้

- แล้วดูที่ Help บอกว่า
Using the this.language JavaScript variable, you can dynamically load the Disqus embed in different languages on a per-page basis. For example, to load the embed in Russian:

var disqus_config = function () {
  this.language = "ru"; // (ลองเปลี่ยนเป็น th แต่ก็ไม่รู้ว่าเอาฟังชั่นนี้ใส่ที่ไหนครับ)
};

(http://help.disqus.com/customer/portal/articles/466249-can-disqus-be-loaded-in-different-languages-per-page-)

เอาไปใส่ตรงไหนครับ ใครทราบบอกที่ครับ ว่าจะเปลี่ยนเป็นไทยได้อย่างไร เช่น คำว่า Comment เป็นแสดงความคิดเห็น
เห็นเว็บอื่นเข้าทำได้ อยากเปลี่ยนเป็นไทยครับ ขอบคุณครับ :wanwan044:


หัวข้อ: Re: Disqus comment system เปลี่ยนเป็นภาษาไทยอย่างไรครับ?
เริ่มหัวข้อโดย: xnnphone ที่ 28 ธันวาคม 2017, 01:59:53
ขออนุญาตขุดนะครับ เนื่องจากเห็นไม่มีใครตอบ และส่วนตัวก็หาเรื่องนี้อยู่เหมือนกัน แต่ก็ไม่เจอวิธี แต่อ่านคู่มือแล้วทำตาม ก็ประมาณนี้ครับ

ข้างล่างคือ Universal Code นะครับ
โค๊ด:
<div id="disqus_thread"></div>
<script>
    /**
     *  RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT
     *  THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR
     *  PLATFORM OR CMS.
     * 
     *  LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT:
     *  https://disqus.com/admin/universalcode/#configuration-variables
     */
    /*
    var disqus_config = function () {
        // Replace PAGE_URL with your page's canonical URL variable
        this.page.url = PAGE_URL; 
       
        // Replace PAGE_IDENTIFIER with your page's unique identifier variable
        this.page.identifier = PAGE_IDENTIFIER;

        // เพิ่มเข้าไปตรงส่วนนี้ครับ เพื่อเลือกภาษาไทย แต่เท่าที่ดู การแปลยังไม่ 100% นะครับ
        this.language = 'th';
    };
    */
   
    (function() {  // REQUIRED CONFIGURATION VARIABLE: EDIT THE SHORTNAME BELOW
        var d = document, s = d.createElement('script');
       
        // IMPORTANT: Replace EXAMPLE with your forum shortname!
        s.src = 'https://EXAMPLE.disqus.com/embed.js';
       
        s.setAttribute('data-timestamp',  new Date());
        (d.head || d.body).appendChild(s);
    })();
</script>
<noscript>
    Please enable JavaScript to view the
    <a href="https://disqus.com/?ref_noscript" rel="nofollow">
        comments powered by Disqus.
    </a>
</noscript>