Code Monkey home page Code Monkey logo

Comments (4)

robisim74 avatar robisim74 commented on September 26, 2024

Hi @ihor-zinchenko,

the problem here is not fr-ca, the problem is that you have to setting format option to language-region, I guess.

Then if you want to use the language-region format, it would be better to use it for each locale.

from angular-l10n.

ihor-zinchenko avatar ihor-zinchenko commented on September 26, 2024

There is my full config code:

export const l10nConfig: L10nConfig = {
    format: 'language-region',
    providers: [
        { name: 'app', asset: './assets/localizations/', options: { version: '11.0.0' } }
    ],
    fallback: false,
    cache: true,
    keySeparator: '.',
    defaultLocale: { language: 'en', currency: 'USD', timeZone: 'America/Los_Angeles' },
    schema: [
        { locale: { language: 'en', currency: 'USD', timeZone: 'America/Los_Angeles' }, dir: 'ltr', text: 'United States' },
        { locale: { language: 'da', currency: 'USD', timeZone: 'America/Los_Angeles' }, dir: 'ltr', text: 'Danish' },
        { locale: { language: 'fr', currency: 'USD', timeZone: 'America/Los_Angeles' }, dir: 'ltr', text: 'French' },
        { locale: { language: 'fr-ca'}, dir: 'ltr', text: 'French (Canada)' },
        { locale: { language: 'zh-sm', currency: 'USD', timeZone: 'America/Los_Angeles' }, dir: 'ltr', text: 'Chinese (simplified)' },
    ],
    defaultRouting: true
};

each line with language-EXAMPLE gives me error

So you mean if i set for example en-us for each line it will work?

from angular-l10n.

robisim74 avatar robisim74 commented on September 26, 2024

If you use the language-region format would be appropriate to use it for all.

However perhaps the error here is that the correct form for the region is uppercase: fr-CA, zh-SM

from angular-l10n.

ihor-zinchenko avatar ihor-zinchenko commented on September 26, 2024

@robisim74 yes, uppercase works correctly!) thanks!

from angular-l10n.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.