Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Localization string engine #450

Open
CymDeveloppement opened this issue Jun 18, 2024 · 7 comments
Open

[Feature] Localization string engine #450

CymDeveloppement opened this issue Jun 18, 2024 · 7 comments
Labels
enhancement New feature or request stdlib

Comments

@CymDeveloppement
Copy link
Member

as described in this guide : http://pgas.freeshell.org/mirror/ABSlocalization.html
localization is possible with dollar sign before double quotes

cd $var || error $"Can't cd to %s." "$var"
read -p $"Enter the value: " var

maybe amber can add this sign easily.

this may make it possible in the future to generate translation files easily directly with Amber or with integrated function

@CymDeveloppement
Copy link
Member Author

or it can be made explicit with a special sign before the double quotes

@Ph0enixKM
Copy link
Member

@CymDeveloppement this is a good question. We could have a special syntax for that local "Hello World" or something similar.

@CymDeveloppement
Copy link
Member Author

@Ph0enixKM i think a explicit keyword like "local" is a good way

@b1ek
Copy link
Member

b1ek commented Jun 19, 2024

shouldn't this kind of thing be done on a library level?

@Ph0enixKM
Copy link
Member

shouldn't this kind of thing be done on a library level?

Good question. Adding blindly new keywords and built-ins will increase the learning curve of this language. This is why it actually would be better as an stdlib function. You're right @b1ek.

@b1ek
Copy link
Member

b1ek commented Jun 20, 2024

Adding blindly new keywords and built-ins will increase the learning curve of this language

it will just make it an unstructured mess imo

@Mte90
Copy link
Member

Mte90 commented Jun 20, 2024

Maybe we can start a new repo with libraries in pure Amber and when that function can be imported in the Amber language.

Like for https://github.com/Ph0enixKM/Amber/issues/218, in this way in Amber we add builtin the most basic stuff and for other exotic they get like a review process and a different usage.

So maybe it's time to create a Github organization for the various repositories?

@Mte90 Mte90 added the enhancement New feature or request label Jun 24, 2024
@Mte90 Mte90 changed the title [Suggestion] use localization with string Localization string engine Jun 24, 2024
@Mte90 Mte90 transferred this issue from amber-lang/amber Sep 3, 2024
@Ph0enixKM Ph0enixKM transferred this issue from another repository Sep 3, 2024
@Mte90 Mte90 added the stdlib label Sep 5, 2024
@Ph0enixKM Ph0enixKM changed the title Localization string engine [Feature] Localization string engine Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stdlib
Projects
None yet
Development

No branches or pull requests

4 participants