# Learning Angular: Set your language culture before any UI is displayed

DevFeed: [Learning Angular: Set your language culture before any UI is displayed](<https://devfeed.tech/articles/learning-angular-set-your-language-culture-before-any-ui-is-displayed-21239.md>)

Original publisher: [Read original article](<https://juri.dev/blog/2015/03/learning-ng-angular-translate-promises/>)

Published: 2015-03-02T00:00:00Z

Content type: tutorial

Language: en

Sources: [Juri Strumpflohner](<https://devfeed.tech/sources/juri-strumpflohner.md>)

Topics: [Angular](<https://devfeed.tech/topics/angular.md>), [Learning](<https://devfeed.tech/topics/learning.md>)

Tags: [angular](<https://devfeed.tech/tags/angular.md>), [api](<https://devfeed.tech/tags/api.md>), [application](<https://devfeed.tech/tags/application.md>), [article](<https://devfeed.tech/tags/article.md>), [backend](<https://devfeed.tech/tags/backend.md>), [bind](<https://devfeed.tech/tags/bind.md>), [cache](<https://devfeed.tech/tags/cache.md>), [capabilities](<https://devfeed.tech/tags/capabilities.md>), [controller](<https://devfeed.tech/tags/controller.md>), [data](<https://devfeed.tech/tags/data.md>), [files](<https://devfeed.tech/tags/files.md>), [i18n](<https://devfeed.tech/tags/i18n.md>), [issue](<https://devfeed.tech/tags/issue.md>), [language](<https://devfeed.tech/tags/language.md>), [learning](<https://devfeed.tech/tags/learning.md>), [loading](<https://devfeed.tech/tags/loading.md>), [locale](<https://devfeed.tech/tags/locale.md>), [localization](<https://devfeed.tech/tags/localization.md>), [route](<https://devfeed.tech/tags/route.md>), [ui](<https://devfeed.tech/tags/ui.md>)

## AI overview

The article's practical fix is to load the current user and set their preferred language before Angular renders the UI. With angular-translate, changing languages refreshes bound translations, but localized data may not refresh correctly and can flicker or appear in the wrong locale if the language is set too late. The author uses a client-side route's promise-returning resolve function to wait for user and language setup. In the real application, the resolve is attached dynamically to routes, so backend calls should be cached to avoid repeating them on each route change; returning the user and language in an object also makes them available to a route controller.

## Source excerpt

Lorem ipsum dolor sit amet