xrpl-dev-portal
xrpl-dev-portal copied to clipboard
Redocly i18n
Some pages currently use redocly's (internally i18next?) useTranslate() to translate content. This does not allow the use of html tags inside strings.
For example, in the following, the order of the two strings is fixed and does not match the order of the strings when translated into Japanese.
{translate('The Blockchain')}
<br className="until-sm" />
{translate('Built for Business')}
(Japanese word order)
{translate('Built for Business')}
<br className="until-sm" />
{translate('The Blockchain')}
If we can use react-i18next's <Trans /> instead, you can write the following, which allows you to freely change the order of strings within a single sentence.
<Trans i18nKey="home.titile">The Blockchain <br className="until-sm" /> Built for Business</Trans>
Since redocly does not seem to support Trans, we may need to consider other methods.
Also, the following sections outside of the default function cannot be translated.
export const frontmatter = {
seo: {
title: 'Dev Tools',
description: "Use these tools to explore, build, and test XRP Ledger technology.",
}
};