Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] ValueError: MSO_LANGUAGE_ID has no XML mapping for 'en-CN' #1038

Open
injet-zhou opened this issue Jan 8, 2025 · 2 comments
Open

[bug] ValueError: MSO_LANGUAGE_ID has no XML mapping for 'en-CN' #1038

injet-zhou opened this issue Jan 8, 2025 · 2 comments

Comments

@injet-zhou
Copy link

An error occurred while attempting to retrieve the language_id attribute of the font.

@sashaKorovkina
Copy link

sashaKorovkina commented Jan 8, 2025

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

@injet-zhou
Copy link
Author

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

Thx, I will try that later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants