File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 11import i18next from 'i18next' ;
22import LanguageDetector from 'i18next-browser-languagedetector' ;
3+ import { VERSION } from './constants' ;
4+
35
46let fallbackResources , languages ;
57if ( typeof IS_MINIFIED === 'undefined' ) {
@@ -149,8 +151,12 @@ export const initialize = () => {
149151 } ,
150152 backend : {
151153 fallback : 'en' ,
152- loadPath :
153- 'https://cdn.jsdelivr.net/npm/p5/translations/{{lng}}/{{ns}}.json'
154+
155+ // ensure that the FES internationalization strings are loaded
156+ // from the latest patch of the current minor version of p5.js
157+ loadPath : `https://cdn.jsdelivr.net/npm/p5@${
158+ VERSION . replace ( / ^ ( \d + \. \d + ) \. \d + .* $ / , '$1' )
159+ } /translations/{{lng}}/{{ns}}.json`
154160 } ,
155161 partialBundledLanguages : true ,
156162 resources : fallbackResources
You can’t perform that action at this time.
0 commit comments