Now awaiting language change

ref #5
This commit is contained in:
Nicolai Ort 2021-02-06 22:02:16 +01:00
parent 388d8a2dc6
commit c07319b250
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ export class PdfCreator {
* @param locale The locale used for the contracts (default:en)
*/
public async generateSponsoringContract(runners: Runner[], locale: string = "en"): Promise<any> {
i18next.changeLanguage(locale);
await i18next.changeLanguage(locale);
const template_source = fs.readFileSync(`${this.templateDir}/sponsoring_contract.html`, 'utf8');
const template = Handlebars.compile(template_source);
const result = template({ runners })