diff --git a/patacrep/songs/__init__.py b/patacrep/songs/__init__.py index 08574959..833f4fe9 100644 --- a/patacrep/songs/__init__.py +++ b/patacrep/songs/__init__.py @@ -102,6 +102,7 @@ class Song: self.datadir = datadir self.fullpath = os.path.join(self.datadir, subpath) self.encoding = config["encoding"] + self.default_lang = config["lang"] self.config = config if self.datadir and self.config['_cache']: diff --git a/patacrep/songs/chordpro/__init__.py b/patacrep/songs/chordpro/__init__.py index a8314548..323548e9 100644 --- a/patacrep/songs/chordpro/__init__.py +++ b/patacrep/songs/chordpro/__init__.py @@ -31,7 +31,7 @@ class ChordproSong(Song): song = parse_song(song.read(), self.fullpath) self.authors = song.authors self.titles = song.titles - self.lang = song.get_data_argument('language', self.config['lang']) + self.lang = song.get_data_argument('language', self.default_lang) self.data = song.meta self.cached = { 'song': song,