Skip to content

Setting locale manually in r.js build is not working #18

@trsrm

Description

@trsrm

I'm developing an application using i18n plugin. And I'm setting locale manually in main.js file according to user preferences. Like this:

requirejs.config({
  config: {
    i18n: { locale: 'some_locale' }
  }
});

And it works pretty well. But I can't set locale manually for r.js build.

According to documentation I'm setting locale in r.js config file and r.js should inline following i18n resources into the build:

{
  ...
  optimize: 'uglify2',
  config: {
    i18n: { locale: 'some_locale' }
  }
}

And it works, i18n resources are actually inlined into the build file. But i18n plugin still detects locale automatically. So nothing works if detected locale and bundled resources don't matched. It happens because i18n plugin is trying to load not existing i18n resources for automatically detected locale.

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