This file is still a binary plist, but the key/values are now different. When reading the Localizable.loctable
data, there is a corresponding locale key that contains the localized values to look up.
Python 3.10.8 (v3.10.8:aaaf517424, Oct 11 2022, 10:14:40) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pathlib import Path
>>> from pprint import pprint
>>> import plistlib
>>> fp = Path("/System/Library/SystemProfiler/SPDisplaysReporter.spreporter/Contents/Resources/Localizable.loctable")
>>> with fp.open("rb") as f:
... data = plistlib.load(f)
...
>>> print(data.keys())
dict_keys(['he', 'ko', 'id', 'nl', 'tr', 'ru', 'hu', 'fi', 'it', 'es_419', 'el', 'ca', 'fr_CA', 'zh_TW', 'zh_HK', 'sv', 'pl', 'no', 'da', 'LocProvenance', 'en', 'ar', 'hi', 'th', 'zh_CN', 'en_GB', 'ms', 'cs', 'sk', 'en_AU', 'de', 'vi', 'pt_BR', 'uk', 'fr', 'ro', 'es', 'ja', 'pt_PT', 'hr'])
>>> pprint(data["en_AU"])
{' @ %@Hz': ' @ %@Hz',
'%@ (%@ %@, %@ %@)': '%1$@ (%2$@ %3$@, %4$@ %5$@)',
'%@ x %@': '%1$@ x %2$@',
'CGSDefaultDepth': 'Default',
'CGSEightBitColor': '8-Bit Colour (Colour Table)',
'CGSEightBitGray': '8-Bit Grey',
'CGSSixteenBitColor': '16-Bit Colour (ARGB1555)',
'CGSSixtyfourBitColor': '64-Bit Colour (ARGB16161616)',
'CGSThirtyBitColor': '30-Bit Colour (ARGB2101010)',
'CGSThirtytwoBitColor': '24-Bit Colour (ARGB8888)',
'SPDisplaysDataType': 'Graphics/Displays',
'Unknown Display': 'Unknown Display',
'_name': 'Video Card',
'display': 'Display',
...
'sppci_port_name': 'Port',
'sppci_revision-id': 'Revision ID',
'sppci_rom-revision': 'ROM Revision',
'sppci_slot_name': 'Slot',
'sppci_subsystem-id': 'Subsystem ID',
'sppci_subsystem-vendor-id': 'Subsystem Vendor ID',
'sppci_vendor-id': 'Vendor ID',
'sppci_vendor_Apple': 'Apple (0x106b)',
'sppci_vendor_Nvidia': 'NVIDIA (0x10de)',
'sppci_vendor_amd': 'AMD (0x1002)'}
>>>