question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New Component: Localized

See original GitHub issue

i18n is boring. Adding labels, and then in every properties file define a value for each supported language. To reduce the effort here, especially for one-time-shot big paragraph translations, we created an inlineTranslation component. Example usage:

<pe:inlineTranslation>
    <pe:translation language="en">
        To register yourself via eID, you simply need to login.
    </pe:translation>
    <pe:translation language="nl">
        Om jezelf via eID te registreren, dien je je simpelweg eens aan te melden.
    </pe:translation>
    <pe:translation language="fr">
        Pour vous inscrire via eID, il vous suffit de vous connecter.
    </pe:translation>
</pe:inlineTranslation>

Here inlineTranslation will render the content of the translation child that comes closest to the UIViewRoot locale, i.e., nl-be will select the nl one. If no match is found, inlineTranslation simply takes the first one.

If there is interest in such component as part of primefaces-extensions, please make some noise here.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:47 (47 by maintainers)

github_iconTop GitHub Comments

1reaction
jepsarcommented, Apr 16, 2022

It’s not JSF, it’s the way the showcase is built. If no locale is provided to the component, indeed the view locale is used. Normally one would have something like this in a multi language application:

<f:view locale="#{user.locale}">
1reaction
jepsarcommented, Mar 30, 2022

I personally prefer LocalizedContent or just Localized or Localization.

From those three I like Localized the most.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Component Level Localization with React and Bit
Step 3 — Implementing Localization ... First, you need to install few dependencies: ... Then, all you need to do is create a...
Read more >
Localizing the component - Flexmonster
The localization JSON file is a JSON file that has a list of all texts and labels that are used in Flexmonster Pivot...
Read more >
Component based localization | Vue I18n
In general, locale info (e.g. locale , messages , etc) is set as constructor option of VueI18n instance and it sets i18n option...
Read more >
Localization Features of the Core Components
It is through the mirrored localization structure that the Core Components can find the necessary localized content for a corresponding page.
Read more >
Component Localizers | Localization | 1.0.5
Component Localizers are MonoBehaviours which you can connect to other components/scripts through UnityEvents. Component Localizers allow for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found