-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs #15502 - this adds the scaffolding for enabling i18n translations within Ghost core - also adds `yarn translate:ghost` as an option to the `i18n` package - the locale is currently hardcoded to `en` so we don't utilize the translations until we're ready
- Loading branch information
1 parent
0273ba2
commit 21ea426
Showing
7 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//const debug = require('@tryghost/debug')('i18n'); | ||
const i18n = require('@tryghost/i18n'); | ||
|
||
module.exports.init = function () { | ||
//const events = require('../lib/common/events'); | ||
//const settingsCache = require('../../shared/settings-cache'); | ||
|
||
module.exports = i18n(/* settingsCache.get('locale') */ 'en', 'ghost'); | ||
|
||
/*events.on('settings.locale.edited', (model) => { | ||
debug('locale changed, updating i18n to', model.get('value')); | ||
i18nInstance.changeLanguage(model.get('value')); | ||
});*/ | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters