Metadata-Version: 2.4
Name: langstr
Version: 0.1.1
Summary: A utility for translations, based on BombSquad
Author-email: Mell <mellboii@tutamail.com>
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# LangStr
langstr (or, Language String) is a library created for the express purpose of getting 
resources from a existing language file and being used as strings.
It's really lightweight, requiring absolutely no other libraries, 
and having little to a single class that handles most logic. Inspired by BombSquad's Lstrs.<br>
In terms of usage, you'd first want to set the path of where your language files are:<br>
```
import langstr
langstr.set_path('path\to\your\languages_folder')
```
Then, it's as simple as creating a LangStr object.<br>
```
langstr.LangStr(resource='myCoolResource')
# or, if you prefer:
langstr.LangStr(r='myCoolResource')
```
LangStr's also support subs, which allow you to replace certain 
values of the resource (eg. ${NAME}) to another string.<br>
```
langstr.LangStr(resource='myCoolResourceWithValues', subs=[ ('${NAME}', 'John') ])
# Assuming myCoolResourceWithValues is 'Welcome, ${NAME}', full text will be 'Welcome, John'
```
Then, whenever you want an actually usable string, just 
evaluate (or stringify) the LangStr object.
```
mylangstr = langstr.LangStr(resource='myCoolResource')
print(mylangstr.evaluate())
# or;
print(str(mylangstr))
# both will output something like 'Hello!', 
# or whatever your resource says
```
