Questions tagged [i18n-js]

22 questions
1
vote
1 answer

How Sprocket's require works?

I have a file called application.js under app/assets/javascripts // = require libs/jquery-retina // = require libs/jquery.popupoverlay // = require libs/messg // = require site_logic/application // = require serviceworker-companion // = require…
1
vote
1 answer

React Native issue with I18n in an array of object

I use I18n in my app with a config : I18n.translations = { en: en, fr: fr, }; if (!__DEV__) { I18n.fallbacks = true; } I18n.defaultLocale = 'en'; I18n.locale = localeLanguageTag as ELanguagesKeys; Then I export it and use…
E.D
  • 831
  • 3
  • 16
  • 33
1
vote
2 answers

How to make react native app save the selected language when i restart the app

I want my app contain a setting screen so that i can change the language from the picker. I want language change is reflected on the whole app and i want the app to remember last selected language. Given below my index.js that import my key value…
0
votes
1 answer

Can't get i18n-js working with firebase functions

I have set up a minimal working example of i18n-js: // located in: src/i18n.ts const i18n = require('i18n-js') i18n.locale = 'en' i18n.fallbacks = true i18n.translations = { en: { hello: 'Hello', }, es: { hello: 'Hola', }, fr: { …
christianbauer1
  • 467
  • 5
  • 16
0
votes
0 answers

Translations management with i18n-js, expo-localization, redux in react native project

I have a react native project I am going to localize with expo-localization and I have some questions about the process, mainly If the way I'm doing this is the right approach and one concrete question I have about beign able to use user language…
Elolawyn
  • 131
  • 1
  • 11
0
votes
1 answer

Add styling to translation string in i18n-js React Native

I use i18n-js for translation purposes in my React Native app. But I cannot get any styling like different colors, bold etc. to my translations. This is my en.js: import {Text} from "react-native"; const highlightText = (string) => …
Twos22
  • 57
  • 1
  • 11
0
votes
1 answer

Rails JS localization issues, i18n-js gem

I'm trying to implement JS localization in Rails 7 app using i18n-js gem. I have some little script for validating contact form attachments and want to translate errors from that JS script. I already have 'rails-i18n' gem and it is working ok, but…
1
2