https://github.com/andrewpetrochenkov/mac-localized.py
:apple: :uk: :de: :es: :fr: :it: :ru: :jp: :cn: macOS '.localized' localized folder name
https://github.com/andrewpetrochenkov/mac-localized.py
macos python
Last synced: about 1 month ago
JSON representation
:apple: :uk: :de: :es: :fr: :it: :ru: :jp: :cn: macOS '.localized' localized folder name
- Host: GitHub
- URL: https://github.com/andrewpetrochenkov/mac-localized.py
- Owner: andrewpetrochenkov
- License: unlicense
- Created: 2018-10-27T18:18:25.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-12-03T21:07:23.000Z (over 5 years ago)
- Last Synced: 2025-12-02T06:52:57.120Z (7 months ago)
- Topics: macos, python
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://pypi.org/project/mac-localized/)
[](https://unlicense.org/)
[](https://github.com/andrewp-as-is/mac-localized.py/actions)
### Installation
```bash
$ [sudo] pip install mac-localized
```
#### How it works
```
Release Notes.localized/
.localized/
en.strings
de.strings
ja.strings
```
`.strings`:
```
"Release Notes" = "Localized name";
```
#### Examples
```python
>>> import mac_localized
>>> mac_localized.mkdir("folder",ru="ru translation",de="de translation")
'folder.localized'
>>> mac_localized.load("folder")
{'ru':'ru translation','de':'de translation'}
>>> mac_localized.update("folder",ru="new ru translation",de="new de translation")
>>> mac_localized.get("folder","ru")
'new ru translation'
>>> mac_localized.rm("folder",["ru"])
>>> mac_localized.rm("folder") # rm all localizations
```
#### Links
+ [Localizing the Name of a Directory](https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemAdvancedPT/LocalizingtheNameofaDirectory/LocalizingtheNameofaDirectory.html)
+ [Display Names](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFileSystem/Articles/DisplayNames.html)