Code Monkey home page Code Monkey logo

Comments (2)

LazZiya avatar LazZiya commented on May 18, 2024

Hi @morgrowe

Actually it is not a bug, the default behavior of localizing strings is case-sensitive. And as you mentioned it is not possible to add "Privacy" and "privacy" to the .resx file because they are considered same from the .resx file pov.

As a workaround, you can use the entry as a key in the resx file; by adding one key for the upper-case and another for lower-case. e.g.:

name value comment
upper_Privacy Preifatrwydd upper case version
lower_privacy preifatrwydd lower case version

then you can call each one by its key:

@_loc.GetLocalizedString("upper_Privacy")

@_loc.GetLocalizedString("lower_privacy")

Or you can use <localize> html tag since you already installed LazZiya.TagHelpers.Localization:

<h1 localize-content>upper_Privacy</h1>
<h1 localize-content>lower_privacy</h1>

Notice : LazZiya.TagHelpers.Locaization is merged into the latest version of LazZiya.ExpressLocalization v4.0, currently it is in preview mode, you may see its docs in the wiki.

from expresslocalization.

morgrowe avatar morgrowe commented on May 18, 2024

Ok great, makes sense. I think I'll migrate to using keys in my .resx file instead. Not sure why that didn't occur to me in the first place.

I look forward to using v4.0 when it's out of preview mode. Thanks for all your hard work!

Cheers
Morgan

from expresslocalization.

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.