Get the default post language from the instance metadata

This commit is contained in:
itepechi 2023-08-12 06:13:31 +09:00
parent d619c2f451
commit e078cf9863
1 changed files with 3 additions and 1 deletions

View File

@ -77,7 +77,9 @@ const getInstanceConfig = async ({ store }) => {
store.dispatch('setInstanceOption', { name: 'accountApprovalRequired', value: data.approval_required })
// don't override cookie if set
if (!Cookies.get('userLanguage')) {
store.dispatch('setOption', { name: 'interfaceLanguage', value: resolveLanguage(data.languages) })
const language = resolveLanguage(data.languages)
store.dispatch('setOption', { name: 'interfaceLanguage', value: language })
store.dispatch('setOption', { name: 'postLanguage', value: language })
}
if (vapidPublicKey) {