MCPcopy Create free account
hub / github.com/Code-Bullet/Jump-King / getLanguageCode

Function getLanguageCode

libraries/p5.js:5756–5775  ·  view source on GitHub ↗
(platformID, languageID, ltag)

Source from the content-addressed store, hash-verified

5754// Returns a IETF BCP 47 language code, for example 'zh-Hant'
5755// for 'Chinese in the traditional script'.
5756function getLanguageCode(platformID, languageID, ltag) {
5757 switch (platformID) {
5758 case 0: // Unicode
5759 if (languageID === 0xFFFF) {
5760 return 'und';
5761 } else if (ltag) {
5762 return ltag[languageID];
5763 }
5764
5765 break;
5766
5767 case 1: // Macintosh
5768 return macLanguages[languageID];
5769
5770 case 3: // Windows
5771 return windowsLanguages[languageID];
5772 }
5773
5774 return undefined;
5775}
5776
5777var utf16 = 'utf-16';
5778

Callers 1

parseNameTableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected