Changing Shaka player locale - shaka

The website I'm making has an option to switch display language between German and English. Shaka player seems to have support for localization switching, but I couldn't manage to display the player in anything other than English.
Tried using changeLocale on a new shaka.ui.Localization instance, but it doesn't appear to have an effect on the player.
Would appreciate any example of switching between locales.

From the GitHub repo's issues,
ui.getControls().getLocalization().changeLocale(['de']) will switch to a German locale.

Related

Shaka Player: Let users choose language track

I am adapting Shaka player to our website and got stuck in the following:
When I play my sample video in the appspot demo, I see the buttons to change language and resolution:
When I follow the tutorial , it does not let me choose the language: see result.
How do I configure the player to let me choose the languages?
Thank you for your help!
PS: Following later steps of the tutorial, I can change the languages, but the buttons are outside the video window, see here. This gives me headache later on, when I proceed to offline DRM.
found the problem: wrong linking of css file in the html:
include a css file like this:
<link rel="stylesheet" href="../css/filename.css">
and not like a js script.

I18n Internalization in react for english and hindi

I am building a single page application using React. I want my website to be available in both the hindi and english language. So, for that I think I have to use react-intl. Okay but how can I make this work? I read a few tutorial but I did not find any good solution for Hindi. Please help me in my research on how to use i18n for English to Hindi.
It seems that Hindi language uses Devanagari script which is written from left to right (LTR), so translating your site to Hindi isn't different from translating it to any other language (e.g. Frech, Spanish, Czech).
All you need to do is add react-intl components to your code, create a message catalog with messages, translate it into Hindi and load it into your app.
If you have a more specific problem, please update your question or post another one.
Also, I'm an author of lingui i18n library which you might consider if you're at the beginning of your project. It's successor to react-intl and very similar in usage. There's a tutorial, but I could help you with any problems you might have with a Hindi.

Number translation with 118n module

I have developed a multi-lingual site with i18n module (7.x-1.13) and everything works as expected.My Drupal version is 7.34.
Recently, my client have asked not to translate the number. The website works in English and Arabic.
To be more specific, when Arabic is chosen, we do not want the numbers to be displayed in Arabic, instead we need to display the same in English. Now, each numbers are translated to Arabic when the language is chosen as Arabic, even the user input.
The default language is Arabic and I haven't installed any modules for translation of numbers.
Any help would be much appreciated.
Thanks in advance!
The main problem was with the font that I was using when Arabic is loaded. This made the English numeric digits to convert to Arabic automatically. I have now made the same font to be loaded in both the languages. This solved my problem.

What is the best way to describe changing between Mobile and Desktop versions of a site?

In the footer of my application I have the following two links:
Mobile Version | Full Site
I believe this should be:
Mobile Version | Desktop Version
However, I would like to know if there is a standard for this and also what the opinion is out there. I think Mobile Version | Full site is a bit confusing as it almost leads you to believe that you’re missing something when you have ‘Mobile Version’ selected and you can click ‘Full site’ to get more content/functionality etc even when on a mobile device.
Thanks,
Picco
Don't know about the standard. But I like the approach where only the link that you're currently not on is present.
So on the mobile site there is a link to : Rich Version
So on the full site there is a link to : Mobile Version
And I definitely agree with #ficher on the auto sensing of the site in the first instance.
First I would recommend redirecting the user automatically if you have two different sites, but that you might already do... in that case maybe you can have something like "see mobile version of this page" and "see full version of this page" when he first arrives.
Second I can recommend media queries to have css on your site effecting content based on screen size. Of course this is not really an answer to your questions but maybe it will help someone :)
Full version next to Mobile version should make it clear if you are going with your way.

Switch between different languages interface in cakePhp

I am learning the locale function in Cakephp.
I am not sure how to design my own locale files so that
users can switch between Spanish and English in my web sites.
Please advise.
The first place I'd go is here, http://book.cakephp.org/view/162/Internationalizing-Your-Application
I've not tried this before, as the project I was working on, English and Swedish, someone had already done the setup.
From what I understand you can manage the language in your routes, to have example.com/en/ or example.com/se then your other routes, and that will load up the correct language translations.
As I understand it there are multiple methods for managing how you switch the language from routes to sessions.

Resources