mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 08:50:06 +02:00
Set html lang and meta http-equiv="content-language" attr on language change.
This commit is contained in:
parent
c801f9ed46
commit
d828f0e0a0
2 changed files with 6 additions and 2 deletions
|
@ -5,6 +5,7 @@ var React = require('react');
|
|||
var assign = require('object-assign');
|
||||
var util = require('../util');
|
||||
var intl = require('../intl');
|
||||
var _ = require('underscore');
|
||||
var LocaleStore = require('../stores/LocaleStore');
|
||||
var LocaleActions = require('../actions/LocaleActions');
|
||||
|
||||
|
@ -88,6 +89,9 @@ var vcsModeRefresh = function(eventData) {
|
|||
|
||||
var intlRefresh = function() {
|
||||
if (!window.$) { return; }
|
||||
var countryCode = LocaleStore.getLocale().replace(/_(.*)$/i, "");
|
||||
$("html").attr('lang', countryCode);
|
||||
$("meta[http-equiv='content-language']").attr("content", countryCode);
|
||||
$('span.intl-aware').each(function(i, el) {
|
||||
var intl = require('../intl');
|
||||
var key = $(el).attr('data-intl');
|
||||
|
@ -328,4 +332,3 @@ exports.getLevelDropdown = function() {
|
|||
};
|
||||
|
||||
exports.init = init;
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
<meta property="og:url" content="https://pcottle.github.io/learnGitBranching/index.html?demo"/>
|
||||
<meta property="og:image" content="https://pcottle.github.io/learnGitBranching/assets/learnGitBranching.png"/>
|
||||
<meta property="og:description" content="An interactive Git visualization tool to educate and challenge!"/>
|
||||
<meta http-equiv="content-language" content="en">
|
||||
|
||||
<link rel="stylesheet" href="build/{{styleFile}}" type="text/css" charset="utf-8">
|
||||
<link rel="stylesheet" href="src/style/font-awesome.css" type="text/css" charset="utf-8">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue