mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 15:25:46 +00:00
eb42a32315
* Translated settings. Added polish option to other languages and in the fronted UI itself. Translated settings to polish * Corrections to the settings. Translated help page * Translated orbit. Made corrections to help and settings * playlists translated * deviceSync translated * search translated * Statistics translated * musicNetwork translated * common translated * player translated * queue translated * albumDetails translated * connection and random mix translated * artistDefails translated * albums translated * smartPlaylists translated * nowPlaying translated. smartPlaylists corrections * sidebar translated * contextMenu translated * translated radio * translated sharePaste * favorites translated * nowPlayingInfo translated * translated home and login * translated artists, genres, licences, migration, mostPlayed, songInfo and tracks * translated changelog, composerDetail, composers, entityRating, folderBrowser, hero, losslessAlbums, luckyMix, miniPlayer, randomAlbums, randomLanding, tray and whatsNew * chore(release): CHANGELOG and credits for Polish locale (PR #1185) * chore(release): mention Polish in 1.49.0 What's New highlights * settings updated with new strings. Deleted old unecessary ones * translated missing translations * Fixed typos * translated missing strings * Added missing translations that appeared in #1186 and #1189
47 lines
1.5 KiB
TypeScript
47 lines
1.5 KiB
TypeScript
import i18n from 'i18next';
|
|
import { initReactI18next } from 'react-i18next';
|
|
import { deTranslation } from './locales/de';
|
|
import { enTranslation } from './locales/en';
|
|
import { frTranslation } from './locales/fr';
|
|
import { zhTranslation } from './locales/zh';
|
|
import { nbTranslation } from './locales/nb';
|
|
import { ruTranslation } from './locales/ru';
|
|
import { nlTranslation } from './locales/nl';
|
|
import { esTranslation } from './locales/es';
|
|
import { roTranslation } from './locales/ro';
|
|
import { jaTranslation } from './locales/ja';
|
|
import { huTranslation } from './locales/hu';
|
|
import { plTranslation } from './locales/pl';
|
|
|
|
const savedLanguage = localStorage.getItem('psysonic_language') || 'en';
|
|
|
|
i18n
|
|
.use(initReactI18next)
|
|
.init({
|
|
resources: {
|
|
en: { translation: enTranslation },
|
|
de: { translation: deTranslation },
|
|
es: { translation: esTranslation },
|
|
fr: { translation: frTranslation },
|
|
nl: { translation: nlTranslation },
|
|
zh: { translation: zhTranslation },
|
|
nb: { translation: nbTranslation },
|
|
ru: { translation: ruTranslation },
|
|
ro: { translation: roTranslation },
|
|
ja: { translation: jaTranslation },
|
|
hu: { translation: huTranslation },
|
|
pl: { translation: plTranslation },
|
|
},
|
|
lng: savedLanguage,
|
|
fallbackLng: 'en',
|
|
interpolation: {
|
|
escapeValue: false,
|
|
},
|
|
});
|
|
|
|
i18n.on('languageChanged', lng => {
|
|
localStorage.setItem('psysonic_language', lng);
|
|
});
|
|
|
|
export default i18n;
|