| 75 | } |
| 76 | |
| 77 | bool LanguageOpen(int32_t id) |
| 78 | { |
| 79 | auto context = GetContext(); |
| 80 | auto& localisationService = context->GetLocalisationService(); |
| 81 | auto& objectManager = context->GetObjectManager(); |
| 82 | try |
| 83 | { |
| 84 | localisationService.OpenLanguage(id); |
| 85 | // Objects and their localised strings need to be refreshed |
| 86 | objectManager.ResetObjects(); |
| 87 | Drawing::ScrollingText::invalidate(); |
| 88 | WindowNotifyLanguageChange(); |
| 89 | return true; |
| 90 | } |
| 91 | catch (const std::exception&) |
| 92 | { |
| 93 | return false; |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | void LanguageFreeObjectString(StringId stringId) |
| 98 | { |