Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Locale independence #28

Open
danfickle opened this issue Jun 28, 2016 · 1 comment
Open

Locale independence #28

danfickle opened this issue Jun 28, 2016 · 1 comment

Comments

@danfickle
Copy link
Owner

We don't want the situation where it works on the developer's machine and not on the server or vice versa because of different locales.

danfickle added a commit that referenced this issue Jun 29, 2016
Text transformers are currently toUpper, toTitle and toLower.
@danfickle
Copy link
Owner Author

The user can now specify custom text transformers. If using the rtl-support module for example they can use:

     Locale lc = Locale.US;
     builder.useUnicodeToLowerTransformer(new ICUTransformers.ICUToLowerTransformer(lc));
     builder.useUnicodeToUpperTransformer(new ICUTransformers.ICUToUpperTransformer(lc));
     builder.useUnicodeToTitleTransformer(new ICUTransformers.ICUToTitleTransformer(lc));

Another example would be using another locale with the default transformers:

      Locale lc = Locale.FRANCE;
      builder.useUnicodeToLowerTransformer(new TextUtil.DefaultToLowerTransformer(lc));
      builder.useUnicodeToUpperTransformer(new TextUtil.DefaultToUpperTransformer(lc));
      builder.useUnicodeToTitleTransformer(new TextUtil.DefaultToTitleTransformer());

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant