Skip to content

Commit

Permalink
env updates
Browse files Browse the repository at this point in the history
  • Loading branch information
erikyo committed Dec 16, 2023
1 parent f068abb commit 24416b1
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"tabWidth": 4,
"semi": false,
"singleQuote": true,
"printWidth": 80,
"printWidth": 100,
"bracketSameLine": false,
"bracketSpacing": true,
"arrowParens": "always"
Expand Down
27 changes: 21 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,39 @@ An ISO-to-language converter module that provides utility functions to work with
- 📊 Data Exploration - Functions to explore ISO data by ISO code, name, or original name.
- 🎯 Focused Functionality - Methods for specialized tasks, such as sorting and language code retrieval.


## Installation

Install the module using npm:

```bash
npm install yourModule
npm install ISOToLanguage
```

## A brief recap
Locale name - en_US
language code ISO 639-1 - en-US
ISO - US

### ISO Country Code
ISO 3166-1-alpha-2 is the standard for country codes. It defines two-letter codes that are unique to each country. For example, the country code for the United Kingdom is `UK`, the country code for France is `FR`, and the country code for Spain is `ES`.

### Language Code
ISO 639 is the standard for language codes. It defines two-letter and three-letter codes that are unique to each language. For example, the two-letter language code for English is `en`, the two-letter language code for French is `fr`, and the two-letter language code for Spanish is `es`.

## Locale Format
The locale format is a way of combining a language code and a country code to represent a specific linguistic and cultural context. There are two main locale formats:

### BCP 47 (IETF language tag):

The BCP 47 format separates the language code and country code with an underscore. For example, `en_US` represents English spoken in the United States, `fr_FR` represents French spoken in France, and `es_ES` represents Spanish spoken in Spain.

### ISO 3166-1-alpha-2 or language code:

The ISO 3166-1-alpha-2 format uses the ISO 3166-1-alpha-2 country code instead of an underscore. For example, `en-US` represents English spoken in the United States, `fr-FR` represents French spoken in France, and `es-ES` represents Spanish spoken in Spain.


## Usage

```typescript
import ISOToLanguage, { CountryData, ISOCode } from 'ISOToLanguage';
```js
import ISOToLanguage from 'ISOToLanguage';

const isoToLanguage = new ISOToLanguage();
```
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"compilerOptions": {
"module": "ES2015",
"moduleResolution": "Node16", // Search under node_modules for non-relative imports.
"module": "ES6",
"pretty": true,
"sourceMap": true,
"strict": true, // Enable strictest settings like strictNullChecks & noImplicitAny.
Expand Down
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const webpackConfig = {
globalObject: 'this',
library: {
name: 'ISOToLanguage',
export: 'default',
type: 'umd'
}
},
Expand Down

0 comments on commit 24416b1

Please sign in to comment.