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 🙏

© 2026 – Pkg Stats / Ryan Hefner

fiftyone.ipintelligence.translation

v4.5.102

Published

Country translation engines for the 51Degrees on-premise IP Intelligence SDK. Turns the weighted ISO country code lists into localized, ordered country name lists.

Readme

51Degrees Node IP Intelligence Country Translation

Developer Documentation

Introduction

This project contains 51Degrees IP Intelligence country translation engines that can be used with the Pipeline API.

This package - fiftyone.ipintelligence.translation

The on-premise IP Intelligence engine returns country information as weighted lists of ISO country codes. This package adds the two translation engines that turn those codes into localized country names and produce complete, ordered lists of every country, so a demo can render a dropdown of countries with the most probable country at the top.

  • CountryCodeTranslationEngine (element data key countrynames) translates the weighted CountryCodesGeographical / CountryCodesPopulation lists from the IP intelligence engine (element data key ip) into the English country names CountryNamesGeographical / CountryNamesPopulation, preserving the weights.
  • CountriesTranslationEngine (element data key countrynamestranslated) translates the English names into the browser language and builds the ordered "All" lists. For each dimension it produces the weighted translated names (CountryNames...Translated), the complete ordered names (CountryNames...AllTranslated) and the index-aligned codes (CountryCodes...All). The weighted countries lead, ordered by descending weight, followed by every remaining country alphabetically by translated name.

The translation YAML files (countrycodes.en_GB.yml and countries.<locale>.yml) are read from the cxx/data/ip-intelligence/Translations folder of the data submodule that ships with fiftyone.ipintelligence.onpremise. A different directory can be supplied to a builder via the translationsPath option.

This package builds on the generic fiftyone.pipeline.translation base.

It can be used like this:

const {
  CountryCodeTranslationEngineBuilder,
  CountriesTranslationEngineBuilder
} = require('fiftyone.ipintelligence.translation');

const pipeline = new IpIntelligenceOnPremisePipelineBuilder({ dataFile })
  .add(new CountryCodeTranslationEngineBuilder().build())
  .add(new CountriesTranslationEngineBuilder().build())
  .build();

const flowData = pipeline.createFlowData();
flowData.evidence.add('query.client-ip', '8.8.8.8');
flowData.evidence.add('header.accept-language', 'fr-FR');
await flowData.process();

const result = flowData.get('countrynamestranslated');
const codes = result.get('countrycodesgeographicalall').value;
const names = result.get('countrynamesgeographicalalltranslated').value;

Installation

npm install fiftyone.ipintelligence.translation

Tests

To run tests you will need to install the jest library.

npm install jest --global

Then, navigate to the module directory and execute:

npm test

Find out more