Skip to content

Language persistence longer than session #86

Description

@ivanstojkovicapps

Hi,

is there a way to persist language longer than session.
If i set another language than my defaultLanguage, every time i refresh the page, it first loads the default language and than switches to selected language (i do that manually, after getting the user settings).
The problem would be solved it would be possible to save cookie longer then session.
I can do that manually, but every time the cookie gets overriden by default language because i have: persistSelection: true.

Here is the config:

app.value('localeConf', {
basePath: 'languages',
defaultLocale: 'en-US',
sharedDictionary: 'common',
fileExtension: '.lang.json',
persistSelection: true,
cookieName: 'COOKIE_LOCALE_LANG',
observableAttrs: new RegExp('^data-(?!ng-|i18n)'),
delimiter: '::'
}).value('localeSupported', [
'en-US',
'de-DE'
]).value('localeFallbacks', {
'en': 'en-US',
'de': 'de-DE'
});

Do you have any suggestions?

best regards Ivan

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions