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

Implement i18n functionality in esbuild-based browser application builder #25099

Closed
clydin opened this issue Apr 28, 2023 · 5 comments
Closed

Comments

@clydin
Copy link
Member

clydin commented Apr 28, 2023

Command

build

Description

Implement the localize option and related functionality for the esbuild-based browser application builder.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

@zip-fa
Copy link

zip-fa commented Jun 11, 2023

Any news?

@jcompagner
Copy link

jcompagner commented Jul 5, 2023

is this error:

"Could not set Locale because angular locale could not be loaded."

the result of this problem?

Edit:

Ah not sure i guess this doesn't work in an esbuild?

 return new Promise<string>((resolve, reject) => {
            import(
                `@/../../node_modules/@angular/common/locales/${localeId}.mjs`).then(
                module => {
                    registerLocaleData(module.default, localeId);
                    resolve(localeId);
                },
                () => {
                    import(`@/../../node_modules/@angular/common/locales/${language.toLowerCase()}.mjs`).then(module => {
                        registerLocaleData(module.default, localeId.split('-')[0]);
                        resolve(language.toLowerCase());
                    }, reject);
                });
        });

we have quite a bit dynamic imports like that (the normal build gives a huge amount of small js files that are generated which i don't see in an esbuild)

@spock123
Copy link

spock123 commented Sep 7, 2023

@jcompagner Correct, i18n is not yet implemented in ESBuild. I'm also waiting for it :)

@alan-agius4
Copy link
Collaborator

Support for localization has been added in v17 which is currently in prerelease.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants