- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
String localization in Channel
I want to perform localization for my channel from English to Spanish Mexican,
for that I had written translations.xml file as..
Can anyone please help in resolve this issue. ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: String localization in Channel
I haven't used string localization, so I probably shouldn't be trying to answer and I'll apologize in advance if the following seems obvious, but what to you get from ifDeviceInfo GetCurrentLocale()? It will only translate if the current locale is "es_MX" as far as I can tell.
https://developer.roku.com/docs/developer-program/core-concepts/localization.md
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: String localization in Channel
Hi @renojim
ifDeviceInfo GetCurrentLocale() will return the current Language code of device,
Like in device language setting if you change language to English it will return en_US if you change it to espanol for me it is showing es_MX i.e Mexican Spanish.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: String localization in Channel
Ok, just checking that you're actually getting "es_MX" back when you're expecting tr() to return the translated text. Hopefully someone that's used it will chime in.
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.