summaryrefslogtreecommitdiff
path: root/i18n.cpp
blob: 5c01b0c132caa7a299fdcc22d4c5e626f9bd693e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
	This file has some own functionality and is used as backward
	compatibility for vdr prior to version 1.5.7 language support.
    Backward compatibility to old language support has been dropped
    on Feb 13, 2015.
 */

#include "i18n.h"

namespace vdrlive
{

	I18n& LiveI18n()
	{
		static I18n instance;
		return instance;
	}

	I18n::I18n()
		: m_encoding(cCharSetConv::SystemCharacterTable() ? cCharSetConv::SystemCharacterTable() : "UTF-8")
	{
		// fix encoding spelling for html standard.
		std::string const iso("iso");
		if (m_encoding.find(iso) != std::string::npos) {
			if (iso.length() == m_encoding.find_first_of("0123456789")) {
				m_encoding.insert(iso.length(), "-");
			}
		}
	}


} // namespace vdrlive