to indicate the, Whenever a change has happened in the markup and Google needs to be notified. Thats generally not too tricky; its just a bit out of the scope of this article. Entering the name of a global object instantiates it. Home activities. However, if we change the lng value to "ar" in our src/services/i18n.js initializer, we should see our app title localized to Arabic. The clip URL must point to the same URL path as the video with additional query Override hashCode. hashCode (JavaScript) Override hashCode. The Webpack dev server will help us with hot-reloading our bundle in the browser as we develop. Thats not too hard to code up. If the locale doesn't specify a country, this will be the empty string. Time and date of when the livestream starts or is expected to start, in If endDate is in the past or present, it indicates stream actually ended on the video description on YouTube, and you may not have to mark specific timestamps in your This JSON well want to fetch in our code and feed to Globalize via its load() function. How do I get a list of country names? but it can help you understand and improve how Google sees your site. Say we want to show the publishing date and time an article of ours. Can be used to create Locales. Below is a list of languages WordPress supports and their translation status of the core Core Core is the set of software required to run WordPress. Some JavaScripting will get the switcher switching. Go deeper Our article, What Is I18n: A Simple Definition of Internationalization, goes into more detail regarding what internationalization (i18n) and localization (l10n) are. properties in addition to VideoObject properties. Thats our translation system in a nutshell. ISO 8601 format. Follow the guidelines. you can manually tell Google about the important points of your video. The start time of the clip expressed as the number of seconds from the beginning of the If possible, the name can be localized for Locale. However, a closer look at our dev tools Network tab reveals a more maintainable download it when you need it translation file solution. Arabic has six plural forms, and we can specify them much the same way. Learn how localization can help you lift them. An ISO-3166 country code for the tax zone. The last two characters define the country. We always need some parts of Globalize and cldr.js; others will depend on the localization features of our app. and ItemList structured data. Alright, enough jibber-jabber. We just need to import the useTranslation React hook to make t available. Return Value. With our libraries installed, we can now write some setup code to get basic localization working. We indicate placeholders for values we want to interpolate in our messages with the {variable} syntax. tries to automatically understand details about your video, you can explicitly provide data with JavaScript, Best practices for marking timestamps on YouTube, After deploying structured data for the first time, After releasing new templates or updating your code, Troubleshoot Note that were using a convention of ending our plural message key with -plural. See the toLocaleString() is an ECMAScript1 (ES1) Of course, the active locales translations are now piping down the network, so our app is lighter on load, and easier to scale and maintain. the Indexing API to make sure how structured data works. As I write this, i18next is one of the most popular JavaScript i18n libraries. Plural handling in the ICU format is second to none and covers complex plural forms like those in Russian or Arabic. For example, we can show the languages in our locale switcher in the active localeEnglish would be in Arabic, for example. Resource The official Globalize docs have a handy API section that lists available functions. With the above, we should see no changes when our app reloads in the browser. If you find issues Angular 10 Tutorial on Localization with Transloco, Full-Stack I18n with Angular and .NET Core, Deep Dive: Vue Translation with vue-i18next, The Only Nuxt.js Tutorial on I18n Youll Ever Need, How to Localize a Svelte App with svelte-i18n, A Step-by-Step Guide to Svelte Localization with svelte-i18n v3, Localizing SolidJS Applications with I18next, How to Localize Apps Using the Aurelia Framework, Localizing StimulusJS Applications With I18next, A Guide to React Localization with i18next, disable the default escaping that i18next does for protection against XSS attacks, React Redux Tutorial: Internationalization with react-i18n-redux, Roll Your Own i18n Solution with React and Redux, Localizing JavaScript & React Apps with LinguiJS, Localized Server-Side Rendering with React, Localizing Meteor Applications Powered by React, React Native i18n with Expo and i18next Part 1, React Native i18n with Expo and i18next Part 2, All You Need to Know About i18n with Gatsby, official documentation of the i18next jQuery plugin, grab the minified distribution script from GitHub, full working code for the app above from our GitHub repo, International Components for Unicode (ICU), The Missing Guide to the ICU Message Format. Now lets say the user has French (Canada) and Chinese (Simplified) in their browser settings. Ideally, there will be an increase of valid pages, and no increase in errors or warnings. Use the following value: startOffset-input is an annotated property. Well have to rework our setup code to use() the HTTP plugin as we initialize i18next. Can be used to create Locales. available at schema.org/ItemList. getVariant (JavaScript) Returns the variant code for this locale. But act fast! One of the most powerful features of using an ICU library like Globalize is the access to an immensely rich variety of CLDR localization data. Go deeper We have a dedicated guide to Detecting browser language preference with JavaScript, which might pique your interest. If the language is missing, the string will begin with an underscore character. add more information about your content, which could provide a better user experience. First, lets provide our message translations. 9- Build and run the app to see the progress. Not too bad: first well need to add a