Giter VIP home page Giter VIP logo

fusionauth-localization's Introduction

FusionAuth Localization semver 2.0.0 compliant

If you're using FusionAuth and your first language is not English, we can use your help! We are shipping support for localized login pages and while our users can localize themselves, we would like to provide a base of languages to use when building out your theme or localization strategy.

If you'd like to contribute, feel free to submit a PR or open an issue so we can discuss how you can help!

Credits

How to translate

For languages listed in the wanted section, start with the theme/message.properties as a base, and rename it by adding a country code suffix. The wanted section outlines the country code and filename per language. If the language you are translating is not listed there simply find your two character country code and append it to follow the pattern below.

If there is already a theme/message_xx.properties file for your language you will find a missing-translations/message_xx.properties file that lists only those messages that are missing from the base theme. Use this file to find the missing messages and add them to the base theme file for you language. You don't have to add new messages in any particular place, you can add them to the bottom and once finished you can run the update.rb ruby script (or we can run it for you) to reorganize the base /theme file and update the /missing-translations file.

It is not required that you translate every message, when a message is not translated FusionAuth will fall back to the default message in the theme. This is generally English unless you have modified the default messages in your theme.

As FusionAuth adds new messages they will not (currently) be automatically added to any of these translated files. This means these messages will only be displayed in English until translated. As mentioned you can find missing translations in the /missing-translations files.

Additional translation guidelines and rules you can find in the section General and Language Specific Translation Guidelines

New message keys

If you are submitting a PR to this repository, please do not add any values to the base messages.properties file. If you find anyplace in a theme where there is a message key that is used but it is not in messages.properties please file an issue in our issues repo specifying the keys that you'd like to be added to the file. The FusionAuth team will need to add those keys to a properties file managed in a different repository and will track doing so via the submitted issue. If you are managing your own messages.properties file and don't care about upstreaming translations to this repository, this note does not apply.

Wanted

This is just a suggested list, please feel free to contribute whatever you can!

We're happy to pay you for your efforts; if you can contribute a new quality translation we can send you $50 as a token of our appreciation, join the forum and let us know so we can send a gift your way.

  • Chinese (Taiwan) - theme/message_zh_TW.properties
  • Greek - theme/message_el.properties
  • Hindi - theme/message_hi.properties
  • Korean - theme/message_ko.properties
  • Norwegian - theme/message_no.properties
  • Punjabi - theme/message_pa.properties

Project Layout

The theme folder contains translations that can be used in a FusionAuth theme. The missing translations folder contains a list of messages that are in the message.properties file (English) that are missing from the language indicated by the country code suffix (e.g. _it for Italian).

theme
├── message.properties       English
├── message_ar.properties    Arabic
├── message_cz.properties    Czech
├── message_da.properties    Danish
├── message_de_AT.properties    German (Austria)
├── message_de_BE.properties    German (Belgium)
├── message_de_CH.properties    German (Switzerland)
├── message_de_DE.properties    German (Germany)
├── message_de_IT.properties    German (Italy)
├── message_de_LI.properties    German (Liechtenstein)
├── message_de_LU.properties    German (Luxembourg)
├── message_es.properties    Spanish
├── message_fi.properties    Finnish
├── message_fr.properties    French
├── message_id_ID.properties Indonesian (Indonesia)
├── message_it.properties    Italian
├── message_ja.properties    Japanese
├── message_nl.properties    Dutch
├── message_pl.properties    Polish
├── message_pt_BR.properties Portuguese (Brazilian)
├── message_ru.properties    Russian
├── message_sv.properties    Swedish
├── message_ua.properties    Ukrainian
missing-translations
├── message_ar.properties    Arabic
├── message_da.properties    Danish
├── message_es.properties    Spanish
├── message_fi.properties    Finnish
├── message_fr.properties    French
├── message_id_ID.properties Indonesian (Indonesia)
├── message_it.properties    Italian
├── message_ja.properties    Japanese
├── message_nl.properties    Dutch
├── message_pl.properties    Polish
├── message_pt_BR.properties Portuguese (Brazilian)
├── message_ru.properties    Russian
├── message_sv.properties    Swedish
├── message_ua.properties    Ukrainian

How to use a translation

First, find the language translation you want.

  • Clone this project.
  • Copy the contents of one of the message properties files.

Next, update your theme.

  • Log in to the FusionAuth administrative user interface.
  • If you only have the default theme, make a copy. The default theme is immutable.
  • Edit your theme.
  • Navigate to the "Messages" tab.
  • Select "Add localization"
  • Set the "Locale" to the language.
  • Paste in the contents of the messages properties file.
  • Click "Submit"
  • Click the blue save icon to save the theme.
  • Update your tenant to use the new theme.

Editing a theme to add localization

Test it out:

Not all translations are up to date. Where there are missing messages, the default English text will be displayed.

Please feel free to contribute any fixes or additional translations for missing messages as well!

General and Language Specific Translation Guidelines

This section documents basic guidelines and rules for a consistent translation across all properties as well as within the different languages.

Please be aware that any comments within the .properties files itself will be overwritten by the original messages.properties when you run the update.rb ruby script. And therefore document any of these comments in this section of the README.

  • Some languages have the notion of formal vs informal address, where the appropriate choice depends on the context and the relationship between the speaker and listeners. This is a complex problem, so the FusionAuth locale files default to the formal choice. Please feel free to modify the locale files as needed.
  • The formal greetings and wording is used no matter the assumed age.

Translation Guidelines for German

  • Make sure to follow the Locale differences, most obvious one the use of Sharp S (ß) instead of double-s (ss)
  • passkey does not have a German translation and only gets capitalized: Passkey
  • Two-Factor gets translated to: Zweistufige Authentifizierung
  • login gets translated to: Anmeldung
  • logout gets translated to: Abmeldung
  • register gets translated to: Registrierung
  • magic link does not have a German translation and only gets capitalized: Magic Link
  • authenticator app gets translated to: Authentifizierungs-App
  • account gets translated to: Konto
  • application gets translated to: Anwendung
  • Vendor products or services like APIs (e.g. OpenID Connect Token API) don't get translated unless it can be found with the vendor.
  • Dont Locale the number format (***) ***-**%s in two-factor-get-code-at-sms, as it's unlikely to 100% match the different German-speaking countries. Instead we use Erhalten Sie einen Code unter der Nummer mit der Endung

fusionauth-localization's People

Contributors

10935336 avatar aaron-ritter avatar brettwp avatar colinfrick avatar dirksierd avatar fahrenholz avatar fusionandy avatar jerryhopper avatar kevinadhiguna avatar krystofremes avatar lamuertepeluda avatar loketony avatar markschmid avatar matthew-altman avatar mgetka avatar mooreds avatar neoosdeploy avatar pigletto avatar rapcal avatar robotdan avatar rubensflinco avatar soullivaneuh avatar tyduptyler13 avatar veturi avatar voidmain avatar wijse avatar zahertalab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fusionauth-localization's Issues

Crowdin

Have you guys taken a look at Crowdin yet? It might be a good start for a platform for translators, and I think they have a free plan for open source works.

Localization Support for Both Simplified and Traditional Chinese

Hello,

We have encountered an issue with the localization feature in FusionAuth themes. Despite configuring the localized_messages map to include both Simplified Chinese (zh_CN) and Traditional Chinese (zh_TW), the language dropdown in our forms is only displaying one option for Chinese.

Here's the snippet from our _theme.tf file (we are using the FusionAuth Terraform Provider:

localized_messages = {
  "zh_CN" : file("${path.module}/../../themes/tpl/i18n/messages_zh_CN.properties"),
  "zh_TW" : file("${path.module}/../../themes/tpl/i18n/messages_zh_CN.properties")
  "ko" : file("${path.module}/../../themes/tpl/i18n/messages_zh_CN.properties"),
}

Please disregard the fact that all the languages are pointing to the same .properties file, we implemented this only for testing purposes to ensure that locales/languages that have not been added to this GH repository can be added manually.

As seen in the attached screenshot, only one Chinese option appears alongside English and Korean. We expect to see both Simplified and Traditional Chinese as separate options.

Could you please guide us on how to properly set up the localization for both Simplified and Traditional Chinese?

Thank you!

image

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.