npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

localizer-js

v1.0.0

Published

Language support development tool for apps.

Downloads

54

Readme

General Information About the Tool

The tool helps to provide language support to your applications. Thanks to the JSON output it gives, it is possible to use it in all your projects. Currently only CLI supports it. The tool is used to provide language support to Sci-Hook systems and is regularly updated by the Sci-Hook Development Team.

How to Install the Tool?

It is possible to install the package directly to your project folder via npm. For this, you must come to the terminal where you run your project and run the npm install command below:

$ npm install localizer-js

After running the command, the latest version of the package will automatically start downloading to the "node_modules" folder. Please wait until npm service completes the process.

How to Use the Tool?

The tool has been developed to be very easy and fast to use. You can start using it by typing localize on the command line.

$ localize compile

It is ensured that the inputs given with the above-mentioned command are compiled as a single file. The command takes a parameter specified as --config or -c. Below is an example of this: $ localize compile --config config.json

The command you see above performs the compilation process with the information it receives from the config.json file specified in the --config parameter.

config.json

{
    "langs": [
        "en",
        "tr"
    ],
    "input-dir": "i18n",
    "output-file": "output.json",
    "files": {
        "messages": "messages",
        "text": "text"
    },
    "global": true
}

An example of configuration is given above.

| Options | Description | | ------------- | ------------------------------ | | langs | It is a list of languages requested as output. | | input-dir | It is the file that contains the values given as input to the system. | | output-file | It is the file that the system gives output in compiled form. | | global | Commonly assigned values for all languages. |

Below is an example image of a file structure created for input-dir:

A folder has been created for messages and text mentioned in files above, and a JSON file for each language has been added to the folders.

The en.json and tr.json files are assigned values as follows:

en.json

{
    "test": "hello"
}

tr.json

{
    "test": "merhaba"
}

Getting Output

$ localize compile --config config.json

When you run the above command, the JSON file specified in the output-file option specified in config.json is output. The output looks like this:

output.json

{
    "en": {
        "text": {
            "test": "hello"
        }
    },
    "tr": {
        "text": {
            "test": "merhaba"
        }
    }
}

Contributors

This software package is developed and provided by the Sci-Hook Organization. It is actively developed by Emirhan Gerçeker.

License

This package is made available as open-source under the MIT License. It is open for development, modification and free use. You can use the package in your personal or organizational projects, you don't need permission from anywhere. Attribution to the developers and Sci-Hook is appreciated but not legally required.