0.8.19 • Published 2 months ago

prodap-lore-locale v0.8.19

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
2 months ago

Prodap Lore Locale

Package used to perform the internationalization of Lore.

See below how to search for specific localization and translation according to the key:

Installation

This is a Node.js library available through the npm registry. Before installing, download and install Node.js. Node.js 18.10.0 or higher is required.

If this is a brand new project, make sure you create a package.json first with the command npm init.

Installation is done using the command yarn add or npm install:

$ yarn add prodap-lore-locale

or

$ npm install prodap-lore-locale

Usage

Below are some ways to get the locale information contained in this library:

Without the locale

Without passing the locale the class will return all locales.

import { Locales } from 'prodap-lore-locale'

const locales = new Locales()

console.log(getLocales) // { "en-US": { "hello": "Hello", ... }, "pt-BR": { "hello": "Olá", ... } }

Passing the locale

Passing the locale the class will return the corresponding locale.

import { Locales } from 'prodap-lore-locale'

const locales = new Locales({ locale: 'pt-BR' })

console.log(getLocales) // { "pt-BR": { "hello": "Olá", ... } }

Looking for a specific translation

When searching for a specific translation, simply enter the corresponding key.

import { Locales } from 'prodap-lore-locale'

const locales = new Locales({ locale: 'pt-BR' })
const hello = locales.translate('hello') // { "hello": "Olá" }

console.log(hello) // Olá

Looking for a specific translation and replace

When looking for a specific translation and want to replace some value, just type the corresponding key and use replace.

import { Locales } from 'prodap-lore-locale'

const locales = new Locales({ locale: 'pt-BR' })
const helloPeople = locales.translate('hello_people').replace('{{VALUE}}', 'Lore') // { "hello_people": "Olá {{VALUE}}" }

console.log(helloPeople) // Olá Lore

Get current library location

In this way it is possible to obtain the current library location.

import { Locales } from 'prodap-lore-locale'

const locales = new Locales({ locale: 'pt-BR' })
const getCurrentLocale = locales.getCurrentLocale()

console.log(getCurrentLocale) // pt-BR

Get library locations

In this way it is possible to obtain the library locations.

import { Locales } from 'prodap-lore-locale'

const locales = new Locales()
const getLocales = locales.getLocales()

console.log(getLocales) // [ "en-US", "pt-BR", ... ]
0.8.19

2 months ago

0.8.9

2 months ago

0.8.7

2 months ago

0.8.12

2 months ago

0.8.11

2 months ago

0.8.14

2 months ago

0.8.13

2 months ago

0.8.10

2 months ago

0.8.16

2 months ago

0.8.15

2 months ago

0.8.18

2 months ago

0.8.17

2 months ago

0.8.5

2 months ago

0.8.4

2 months ago

0.8.6

2 months ago

0.8.1

2 months ago

0.8.3

2 months ago

0.8.2

2 months ago

0.5.10

3 months ago

0.7.2

2 months ago

0.7.1

3 months ago

0.7.4

2 months ago

0.7.3

2 months ago

0.7.0

3 months ago

0.4.10

4 months ago

0.4.11

4 months ago

0.8.0

2 months ago

0.6.7

3 months ago

0.6.6

3 months ago

0.6.9

3 months ago

0.6.8

3 months ago

0.6.10

3 months ago

0.6.11

3 months ago

0.5.4

3 months ago

0.5.3

3 months ago

0.5.6

3 months ago

0.5.5

3 months ago

0.5.0

4 months ago

0.5.2

3 months ago

0.5.1

3 months ago

0.7.9

2 months ago

0.7.6

2 months ago

0.7.5

2 months ago

0.7.8

2 months ago

0.7.7

2 months ago

0.6.3

3 months ago

0.6.2

3 months ago

0.6.5

3 months ago

0.6.4

3 months ago

0.6.1

3 months ago

0.6.0

3 months ago

0.4.9

4 months ago

0.4.8

4 months ago

0.7.11

2 months ago

0.7.10

2 months ago

0.7.13

2 months ago

0.7.12

2 months ago

0.5.8

3 months ago

0.5.7

3 months ago

0.5.9

3 months ago

0.7.15

2 months ago

0.7.14

2 months ago

0.7.16

2 months ago

0.4.5

4 months ago

0.4.4

4 months ago

0.4.7

4 months ago

0.4.6

4 months ago

0.4.1

4 months ago

0.4.0

4 months ago

0.4.3

4 months ago

0.4.2

4 months ago

0.3.14

4 months ago

0.0.150

6 months ago

0.0.205

5 months ago

0.0.206

5 months ago

0.0.200

5 months ago

0.3.0

4 months ago

0.3.6

4 months ago

0.3.5

4 months ago

0.3.8

4 months ago

0.3.7

4 months ago

0.3.2

4 months ago

0.3.1

4 months ago

0.3.4

4 months ago

0.3.3

4 months ago

0.0.128

7 months ago

0.0.127

7 months ago

0.0.126

7 months ago

0.0.129

7 months ago

0.1.0

5 months ago

0.1.2

5 months ago

0.1.1

5 months ago

0.0.139

7 months ago

0.0.138

7 months ago

0.0.137

7 months ago

0.0.136

7 months ago

0.3.9

4 months ago

0.0.131

7 months ago

0.0.130

7 months ago

0.3.13

4 months ago

0.0.135

7 months ago

0.3.12

4 months ago

0.0.134

7 months ago

0.3.11

4 months ago

0.0.133

7 months ago

0.3.10

4 months ago

0.0.132

7 months ago

0.0.149

6 months ago

0.0.148

6 months ago

0.0.147

6 months ago

0.0.142

6 months ago

0.0.141

6 months ago

0.0.140

6 months ago

0.0.146

6 months ago

0.0.145

6 months ago

0.0.144

6 months ago

0.0.143

6 months ago

0.2.1

5 months ago

0.2.0

5 months ago

0.2.7

5 months ago

0.2.6

5 months ago

0.2.9

5 months ago

0.2.8

5 months ago

0.2.3

5 months ago

0.2.2

5 months ago

0.2.5

5 months ago

0.2.4

5 months ago

0.0.124

7 months ago

0.0.123

7 months ago

0.0.122

8 months ago

0.0.121

8 months ago

0.0.120

8 months ago

0.0.119

8 months ago

0.0.117

9 months ago

0.0.116

9 months ago

0.0.118

9 months ago

0.0.115

9 months ago

0.0.114

9 months ago

0.0.113

9 months ago

0.0.112

9 months ago

0.0.111

10 months ago

0.0.110

10 months ago

0.0.109

10 months ago

0.0.108

10 months ago

0.0.107

10 months ago

0.0.106

10 months ago

0.0.105

11 months ago

0.0.104

11 months ago

0.0.103

12 months ago

0.0.102

12 months ago

0.0.101

1 year ago

0.0.100

1 year ago

0.0.99

1 year ago

0.0.98

1 year ago

0.0.97

1 year ago

0.0.84

1 year ago

0.0.85

1 year ago

0.0.86

1 year ago

0.0.87

1 year ago

0.0.88

1 year ago

0.0.89

1 year ago

0.0.80

1 year ago

0.0.82

1 year ago

0.0.83

1 year ago

0.0.75

1 year ago

0.0.77

1 year ago

0.0.78

1 year ago

0.0.79

1 year ago

0.0.95

1 year ago

0.0.96

1 year ago

0.0.90

1 year ago

0.0.91

1 year ago

0.0.92

1 year ago

0.0.93

1 year ago

0.0.94

1 year ago

0.0.73

1 year ago

0.0.74

1 year ago

0.0.70

1 year ago

0.0.71

1 year ago

0.0.72

1 year ago

0.0.47

2 years ago

0.0.62

1 year ago

0.0.63

1 year ago

0.0.64

1 year ago

0.0.65

1 year ago

0.0.66

1 year ago

0.0.67

1 year ago

0.0.68

1 year ago

0.0.69

1 year ago

0.0.60

1 year ago

0.0.61

1 year ago

0.0.59

1 year ago

0.0.51

2 years ago

0.0.52

2 years ago

0.0.53

2 years ago

0.0.54

2 years ago

0.0.55

2 years ago

0.0.56

2 years ago

0.0.57

1 year ago

0.0.58

1 year ago

0.0.48

2 years ago

0.0.49

2 years ago

0.0.40

2 years ago

0.0.41

2 years ago

0.0.42

2 years ago

0.0.43

2 years ago

0.0.44

2 years ago

0.0.45

2 years ago

0.0.46

2 years ago

0.0.37

2 years ago

0.0.38

2 years ago

0.0.39

2 years ago

0.0.34

2 years ago

0.0.35

2 years ago

0.0.36

2 years ago

0.0.20

2 years ago

0.0.21

2 years ago

0.0.22

2 years ago

0.0.23

2 years ago

0.0.24

2 years ago

0.0.25

2 years ago

0.0.18

2 years ago

0.0.19

2 years ago

0.0.30

2 years ago

0.0.31

2 years ago

0.0.32

2 years ago

0.0.33

2 years ago

0.0.26

2 years ago

0.0.27

2 years ago

0.0.28

2 years ago

0.0.29

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago