From 1e0157f184788c3f5d6ad2d4487cfe5aeee9a3f4 Mon Sep 17 00:00:00 2001 From: Youri Date: Tue, 25 May 2021 15:48:13 +0200 Subject: [PATCH] Corrected namespace for Language class in docs. The docs referenced the wrong namespace for the Language class. It said ``PhpOffice\PhpWord\ComplexType\Language``, but there's no Language class in the namespace ``PhpOffice\PhpWord\ComplexType``. I searched in the tests to figure out where the Language class has moved to and found in ``PhpOffice\PhpWord\Writer\Word2007\Part\SettingsTest::testLanguage()`` this had to be ``PhpOffice\PhpWord\Style\Language``. --- docs/general.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/general.rst b/docs/general.rst index d4b9b99c45..0d08739729 100644 --- a/docs/general.rst +++ b/docs/general.rst @@ -228,7 +228,7 @@ The default language of the document can be change with the following. $phpWord->getSettings()->setThemeFontLang(new Language(Language::FR_BE)); ``Language`` has 3 parameters, one for Latin languages, one for East Asian languages and one for Complex (Bi-Directional) languages. -A couple of language codes are provided in the ``PhpOffice\PhpWord\ComplexType\Language`` class but any valid code/ID can be used. +A couple of language codes are provided in the ``PhpOffice\PhpWord\Style\Language`` class but any valid code/ID can be used. In case you are generating an RTF document the language need to be set differently.