| 755 | |
| 756 | } |
| 757 | bool Localization::SetGlobalLabel |
| 758 | ( |
| 759 | string index, |
| 760 | string text, |
| 761 | string lang |
| 762 | ) |
| 763 | { |
| 764 | if (m_globalLabelLocalizationMap.find(index) == m_globalLabelLocalizationMap.end()) { |
| 765 | m_globalLabelLocalizationMap[index] = new LabelLocalizationEntry(0); |
| 766 | } else if (m_globalLabelLocalizationMap[index]->HasLabel(lang)) { |
| 767 | Log::Write( LogLevel_Warning, "Localization::SetGlobalLabel: Duplicate Entry for GlobalText %s: %s (Lang: %s)", index.c_str(), text.c_str(), lang.c_str() ); |
| 768 | return false; |
| 769 | } |
| 770 | if( lang.empty() ) |
| 771 | { |
| 772 | m_globalLabelLocalizationMap[index]->AddLabel(text); |
| 773 | |
| 774 | } |
| 775 | else |
| 776 | { |
| 777 | m_globalLabelLocalizationMap[index]->AddLabel(text, lang); |
| 778 | |
| 779 | } |
| 780 | return true; |
| 781 | } |
| 782 | |
| 783 | bool Localization::WriteXMLVIDHelp |
| 784 | ( |