Skip to content

i18n sourceLocale: en-US with @angular/localize does not go to root folder, neither baseHref #17014

@miki995

Description

@miki995

🚀 feature request

Relevant Package

This feature request is for @angular/localize

Description

When doing ng build --localize e.g. for 3 languages, for default one en-US, en-GB, and nl, the ng build creates 3 folders inside dist which means there is no default files under dist, thus application can be only accessed with http://localhost:3000/en-US if you set port to 3000.

Describe the solution you'd like

If you have a solution in mind, please describe it.

Can we introduce default baseHref to be empty string "", and to add e.g. new property (outputhPath) to sourceLocale in angular.json to be root as default?

Describe alternatives you've considered

Have you considered any alternative solutions or workarounds?

I've found a way to add rsync command to extract default folder to root like this e.g.
rsync -a dist/en-US/* dist/ && rm -rf dist/en-US and to set baseHref property inside angular.json file with this:

"i18n": { "sourceLocale": { "baseHref": "" }, }

This way, my app loads at http://localhost:3000 as usual.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions