Socket
Socket
Sign inDemoInstall

windows-directory-localization

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

windows-directory-localization

Localize Windows's special directories such as Documents or Desktop


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

windows-directory-localization

Localize Windows's special directories such as Documents or Desktop

Usage

import localizeDirName from "windows-directory-localization";

// Example in Japanese:
localizeDirName("C:\\Users\\user\\Desktop"); // Expects to be "デスクトップ", which means "Desktop" in Japanese

If the specified directory is not found or doesn't have a localized name, it will be fallen back to the directory's original name.

localizeDirName("C:\\Users\\user\\AppData"); // Expects to be "AppData"
localizeDirName("C:\\Users\\user\\NotFound"); // Expects to be "NotFound"

This module calls Windows API directly so that you can use not only Japanese but also any language supported by Windows. Also, this is NOT able to use on other platforms, therefore.


Windows のディレクトリ名を翻訳された表示名に変換します。

使い方

import localizeDirName from "windows-directory-localization";

localizeDirName("C:\\Users\\user\\Desktop"); // "デスクトップ"

指定されたディレクトリが存在しない場合や、表示名が存在しない場合は、元の名前をそのまま返します。

localizeDirName("C:\\Users\\user\\AppData"); // "AppData"
localizeDirName("C:\\Users\\user\\NotFound"); // "NotFound"

Windows API を直接呼び出しているため、日本語に限らず多言語で利用が可能です。 この仕様により、他の OS 上では動作しません

FAQs

Package last updated on 29 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc