Can I use different fonts for each language in React Native? - react-native

I'm using React Native to create a Korean app.
I want to use different fonts such as Korean and English.
For example, 헬로우 World
In this case, Is there a way to use different fonts?
I'd appreciate it if someone could tell me how.

You can change the font-family of the app for different languages.
Based on the user's selected language, change the font-family to something specific. You can store the font family in a centralized store like Redux.

Related

In React Native, should accessibilityLabel be localized?

I assume that the accessibilityLabel for a component should be localized when you have an app supporting multiple languages. Can someone confirm this is the case? Or is there some other way you're meant to handle localization for this?
I've seen the accessibilityLanguage prop, but I have to assume that isn't actually going to do the translation for you. I haven't been able to find anyone talking about using translations in the label itself, so I just want to confirm.

How to make a family tree app using React Native?

For school, I have to make my first app with React Native. It's a family tree app; my teacher said it's the best choice to make that with all View-elements, even the lines between family members. But I think that won't ever be possible to calculate all distances perfectly.
Isn't there any other way to make this kind of app?
I think you are right and you need to take something like https://github.com/software-mansion/react-native-svg
With SVG you can draw shapes and arrows to connect your tree items.
For React exists a beautiful library called https://reactflow.dev. Unfortunately, it is a Web-only solution, but you can check how they render trees and repeat it in RN.
Also, read this article about storing tree data in JS https://medium.com/#iampika/javascript-trees-b8f3b4261c3a it should be helpful.

Using international characters in React Native

I have the following international text in my react native app:
<Text>ᚘᚘᚘ</Text>
However, a blank line is displayed to my screen where the text should go. I have tried for other international characters as well and it is the same result.
I am using notepad++ and making sure that encoding is set to UTF-8. If I use console.log("ᚘᚘᚘ") it displays to the console just fine. Do I specifically need to embed a particular unicode font in my React Native project for it to work correctly? Or what should I be doing so that it displays my text correctly?
On further investigation I am using a Samsung Galaxy S2 for testing purposes. It does not seem to handle unicode characters in all applications, so I think my app will not work in older devices unless I specifically embed a Unicode font. Am I correct in my thinking?
The only solution I found to this was to add a custom font. This link explains how to use a custom font: https://blog.bam.tech/developper-news/add-a-custom-font-to-your-react-native-app . The font I used is called GNU FreeFont located here: https://www.gnu.org/software/freefont/

React Native native-base's advantages?

I'm now studying framework react native native-base.
While reading document, I think it is little bit different with original code.
For example, <View> is replace to <Container>
Also many codes replace to native-base's style code like this.
So I'm wondering, are there a lot of people coding in native-base syntax?
Does native-base have any performance problem?
(I know that there are lots of good features, But I'm not talking about that. Just performance, and syntax...)
NativeBase framework are exposing exactly the same UX as natively written applications because NativeBase uses the React Native platform's default rendering and layout engine.
NativeBase allows to have a common codebase for all their application code.
NativeBase is targeted specially on the look and feel, and UI interplay of your app. NativeBase without a doubt fits in well with mobile applications (i.e. use of Container, Header, Footer etc) which cut downs one huge part of your app The Front end.

React Native inputs on iOS and Android

I've been evaluating React Native as a replacement for Cordova, and was wondering if there is a widely accepted solution for styled text inputs. I'd like to see text inputs rendered in Material Design on Android, and Apple style on iOS.
Do you have recommendations for a specific library, or will I have to write my own/combine multiple libraries? Thank you!
You could check out https://nativebase.io/ it supports platform specific default styling there are others as well like https://react-native-training.github.io/react-native-elements/ and http://www.xinthink.com/react-native-material-kit/ which has consistent styling regardless of platform.
Coming from a Cordova/Sencha Touch background I suggest you try to create your own style using only the default react native components, the reason is that before I was having the same question regarding component library that I could use so that I could target all platform at once, but react native isn't 100% cross platform and learning to style on different platform might give you an idea and feedback with your evaluation, unless your aiming to have a project as soon as possible and that is a different story.