Forum


Replies: 2   Views: 2404
Page numbering in other languages than english
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by sic@visavet.ucm.es  · 28-03-2018 - 08:21

Hi,

i would like to know if it is possible to add page numbering to a Word document in other languages than english, in the form of "Page X of Y". For instance, in spanish "Página X de Y". I cannot concatenate the word "Página" with the page number because I need the "de Y" part.

I cannot find any option to do that in the API. Any suggestions?

Thank you.

Posted by admin  · 28-03-2018 - 14:40

Hello,

Yes, you can customize that content. To accomplish this task, you need to overwrite the static var $pageNumber in the OOXMLResources.inc file. This var is a public static variable with the skeleton to be used, so you can copy and paste its content and translate w:t tags in your custom script.

Regards.

Posted by sic@visavet.ucm.es  · 02-04-2018 - 07:51

Yeah! That worked.

Thanks