Comments (2)
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 ofLazZiya.ExpressLocalization v4.0
, currently it is in preview mode, you may see its docs in the wiki.
from expresslocalization.
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)
- Roadmap HOT 2
- DefaultRequestCulture not working when change to non-en culture in 3.1.3 HOT 3
- Can we create custom DataAnnotations to avoid re-typing ErrorMessage in every attribute HOT 1
- Null pointer exception HOT 5
- Change culture along with Area and extra parameter HOT 6
- Language Selection Dropdown not Working HOT 4
- NullReferenceException when RazorPages is not enabled for MVC project with .NET CORE 3.1 HOT 3
- Missing ExRequiredAttributeAdapter HOT 3
- RoutePatternException HOT 8
- DataAnnotation messages not being translated HOT 2
- Retrieve Value from .resx file HOT 6
- Problem with ExpressValidationAttributeAdapterProvider HOT 7
- ExRange unexpected behavior as Required HOT 3
- ExpressLocalizationCore3 Field Validation Issue HOT 2
- Culture is not supported HOT 9
- Null Reference Error HOT 4
- Urls without language tag does not work. HOT 2
- Localization with query string HOT 3
- Breaking change in MS.NET.Test.Sdk HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from expresslocalization.