Comments (3)
นี่เป็นตัวอย่าง view ที่ใช้นะครับ เป็น title text ที่ใช้ resource ตามรูปที่ 1 ครับ
รูปที่ 2 คือ preview ของ view ตอนที่ใช้ภาษาอังกฤษ
รูปที่ 3 คือ view ตอนที่เลือกเปลี่ยนเป็นภาษาไทยแล้ว จะเห็นว่า หลังคำว่า SINCE ที่เป็นวันที่กับคำว่า Walk เปลี่ยนเป็นภาษาไทยเรียบร้อยดี เพราะผมเช็คจาก getCurrentLanguage ของ LocalizationActivity น่ะครับ
รูปที่ 4 คือ view เมื่อผม kill app และเปิดใหม่อีกครั้งนึง จะเห็นว่าทั้งหน้าเปลี่ยนเป็นภาษาที่ถูกต้องแล้ว
ข้อมูลเพิ่มเติม นี่เป็น fragment ที่อยู่กับ activity อีกทีนึงครับ
หรืออาจจะผิดที่ผมเองที่ทำอะไรผิดขั้นตอนไปหรือเปล่าครับ
from localization.
ขอโทษด้วยครับ ไม่รู้ว่ายังทันหรือป่าว แต่มี Issue ที่คล้ายๆกันที่ผมเพิ่งแก้ไปใน 1.2.6 ครับ
from localization.
ถ้าอาการแบบนี้ น่าจะเป็นเฉพาะบาง View ด้วยใช่มั้ยครับ ถ้าเป็นไปได้อยากรู้ว่าเป็น View แบบไหน และกำหนดข้อความลงใน View ยังไง
ลองเช็คดูด้วยว่า View เหล่านั้นเวลากำหนดค่าเข้าไปมันกำหนดเป็น String Resource หรือ String เฉยๆ เพราะถ้ากำหนดเป็น String Resource เวลาเปลี่ยนภาษามันจะอัปเดตตามภาษาให้ แต่ถ้าโยน String เข้าไปเฉยๆ มันจะไม่เปลี่ยนให้อยู่แล้วครับ
from localization.
Related Issues (20)
- getDefaultLanguage should have access to a context.
- Cannot us setLanguage in PreferenceFragmentCompat HOT 2
- AppCompat's DayNight theme does not apply when toggle the dark mode in v1.2.10 HOT 1
- App crashes first time using web view after setting a new language in the application. HOT 11
- it is make hyper pay it online payment get way stop ! HOT 2
- LocalizationActivity >= 1.2.6 does not work with ViewPump
- ANR issue when getString() HOT 1
- App crashes when using WebView even after updating to v1.2.10 HOT 4
- In Activity, onConfigurationChanged function always return one orientation information while rotate the device. HOT 1
- Change Language from Fragment HOT 2
- Library doesn't work in Google Play Internal Testing HOT 1
- Version 1.2.10 - ClassCastException in specific devices (Lenovo, Asus) HOT 4
- Version 1.2.9 => Getting ANR issue in LocalizationActivityDelegate.kt file. HOT 5
- Not working in combination with dagger hilt HOT 3
- java.lang.RuntimeException: Using WebView from more than one process at once HOT 3
- Version 1.2.10 => Caused by android.os.BadParcelableException: ClassNotFoundException when unmarshalling: cf HOT 11
- call setLanguage inside Fragment
- Theme change not working HOT 1
- Crash on checkLocaleChange HOT 1
- Crash - Could not find an Application in the given context [ Android Hilt ] HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from localization.