python-pptx
python-pptx copied to clipboard
[bug] ValueError: MSO_LANGUAGE_ID has no XML mapping for 'en-CN'
An error occurred while attempting to retrieve the language_id attribute of the font.
Setting the Language ID in python-pptx
Try this:
from pptx.enum.lang import MSO_LANGUAGE_ID
# Set the font language to Polish
font.language_id = MSO_LANGUAGE_ID.POLISH
To find the appropriate language identifier for your specific case, refer to the documentation: python-pptx: MsoLanguageId Documentation
Setting the Language ID in python-pptx
Try this:
from pptx.enum.lang import MSO_LANGUAGE_ID # Set the font language to Polish font.language_id = MSO_LANGUAGE_ID.POLISHTo find the appropriate language identifier for your specific case, refer to the documentation: python-pptx: MsoLanguageId Documentation
Thx, I will try that later.