为基于CHtmlView的应用添加Sranantongo支持,求对应HTML语言代码
Great question! I’ve run into similar niche language code issues before, so let’s walk through the right approach here.
First, the key detail: Sranantongo doesn’t have an ISO 639-1 two-letter code (which is why you didn’t spot it in common language code lists). However, it does have an official ISO 639-3 three-letter code that’s fully recognized in HTML standards:
- Base language code:
srn - If you want to specify the primary region (Suriname, where Sranantongo is most widely used), use the regional variant:
srn-SR
For your CHtmlView-based app, you’ll set this directly in the HTML’s root element, like so:
<!-- Basic language tag --> <html lang="srn"> <!-- Region-specific tag --> <html lang="srn-SR">
Good news: CHtmlView relies on Microsoft’s browser engine, which fully supports ISO 639-3 codes in the lang attribute. This setup will correctly identify your content’s language for accessibility tools, localization logic, and any browser-based features that depend on language context.
If you ever encounter tools that seem to struggle with three-letter codes (a rare edge case), stick with srn—it’s the official, standardized code for Sranantongo, so it’s the most reliable choice long-term.
内容的提问来源于stack exchange,提问作者Andrew Truckle

