Giter Club home page Giter Club logo

Comments (3)

James941108 avatar James941108 commented on August 10, 2024 1

นี่เป็นตัวอย่าง view ที่ใช้นะครับ เป็น title text ที่ใช้ resource ตามรูปที่ 1 ครับ
รูปที่ 2 คือ preview ของ view ตอนที่ใช้ภาษาอังกฤษ
รูปที่ 3 คือ view ตอนที่เลือกเปลี่ยนเป็นภาษาไทยแล้ว จะเห็นว่า หลังคำว่า SINCE ที่เป็นวันที่กับคำว่า Walk เปลี่ยนเป็นภาษาไทยเรียบร้อยดี เพราะผมเช็คจาก getCurrentLanguage ของ LocalizationActivity น่ะครับ
รูปที่ 4 คือ view เมื่อผม kill app และเปิดใหม่อีกครั้งนึง จะเห็นว่าทั้งหน้าเปลี่ยนเป็นภาษาที่ถูกต้องแล้ว
ข้อมูลเพิ่มเติม นี่เป็น fragment ที่อยู่กับ activity อีกทีนึงครับ

หรืออาจจะผิดที่ผมเองที่ทำอะไรผิดขั้นตอนไปหรือเปล่าครับ

xml
image1
image2
image3

from localization.

akexorcist avatar akexorcist commented on August 10, 2024 1

ขอโทษด้วยครับ ไม่รู้ว่ายังทันหรือป่าว แต่มี Issue ที่คล้ายๆกันที่ผมเพิ่งแก้ไปใน 1.2.6 ครับ

from localization.

akexorcist avatar akexorcist commented on August 10, 2024

ถ้าอาการแบบนี้ น่าจะเป็นเฉพาะบาง View ด้วยใช่มั้ยครับ ถ้าเป็นไปได้อยากรู้ว่าเป็น View แบบไหน และกำหนดข้อความลงใน View ยังไง

ลองเช็คดูด้วยว่า View เหล่านั้นเวลากำหนดค่าเข้าไปมันกำหนดเป็น String Resource หรือ String เฉยๆ เพราะถ้ากำหนดเป็น String Resource เวลาเปลี่ยนภาษามันจะอัปเดตตามภาษาให้ แต่ถ้าโยน String เข้าไปเฉยๆ มันจะไม่เปลี่ยนให้อยู่แล้วครับ

from localization.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.