Apple have clear instructions on how to change the display name of an IOS app, but they are not useful for a react-native app because the folder structure is different. How do you change the display name if you have a react-native app?
iOS
Goto ios/<Appname>/Info.plist and edit the $(PRODUCT_NAME) to change the display name
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
Android
Goto android/app/src/main/res/values/strings.xml and edit the APP_NAME to change the name
<string name="app_name">APP_NAME</string>
for ios just add this to Info.plist
<key>CFBundleDisplayName</key>
<string>APP_NAME</string>
for android edit strings.xml file which located in res/values/
<string name="app_name">APP_NAME</string>
res -> values -> strings.xml
<string name="app_name">YOUR APP NAME HERE</string>
Change that and you will have changed your display name of the app.
Inside the manifest file, inside the application tag you will find
android:label="#string/app_name"
You can change this too, if you want to change the display name of your app.
Note: It is always recommended to have values stored in the "values" folder instead of hardcoding the values directly.
There's a file called app.json in the root of your project. Just change the "displayName" then delete ios folder and run "react-native eject".
file path : /android/app/src/main/res/values/strings.xml
replace My App with your app name.
Instead of creating an app from a template with a Display Name which needs to be changed later, it would be preferable to create the app with the desired names from the start, as I explain here in my answer. For a new app use:
npx react-native init NewcoFrameDesign --title "Newco Frame Design"
The --title option corresponds to the display name in android/app/src/main/res/values/strings.xml and ios/NewcoFrameDesign/Info.plist as well as in app.json.
Related
I am new to android studio. I am trying to create an application with localisation(Tamil). When I paste my Tamil language into android editor the font is not appearing as it should. Here is the Screen shot of my android studio
Already surfed lot here. There is no answer for this issue. It would be great if anyone help on this.
When i tried to generate that same condition I came to know that you haven't added that string named "app" in your default locale i.e. in strings.xml and you are directly trying to add a translation for it.
When u hover to that error it states:
app is transalted here but not found in default locale.
First add(create) that string in your strings.xml file and then try to add it in your strings.xml (tamil) file.
Follow these steps:
First go to your project's res folder --> then open values folder --> then open "strings.xml" file and remove all text inside it and paste the text shown below:
<resources>
<string name="app_name">My Application</string>
<string name="tamil_app_name">ஆங்கில தட்டச்சு வழியாக நம் மொழி</string>
</resources>
Because you have to create a Tamil language string file to set your language. please do the following steps-:
1) Firstly declare all the strings in main strings.xml
2) Then create the string file according to your language choice, Example strings.xml(ta)
3) (ta) is the language code accordingly.
4) The Strings that you have in your main string file convert them into particular language which you want then paste it into the new created String file.
I'm new to Android app development, trying to follow an intro book on the subject. After creating a blank project, I'm instructed to open the string.xml file, which is supposed to contained the element <string name="hello_world">Hello World!</string> in order to edit the default text of the TextView object. However, the file doesn't contain this element. It only contains:
Also, the book only shows an activity_main.xml layout file, whereas I'm seeing both an activity_main.xml and a content_main.xml file.
Perhaps this is a version issue? My install of the Android SDK is on Windows 10 with the latest API 23, whereas I think the book was published before API 23 was released.
The default project template has probably changed since the book was written.
Try creating a new project, and when asked, choose "Empty Activity" instead of "Blank Activity". This should only include activity_main.xml
This doesn't include the hello_world string in the resources however, so just add it yourself by adding a line with
<string name="hello_world">Hello World!</string>
to the strings.xml
Moreover, they decided to break the convention they had been going with for the default template. There is a TextView in the activity_main.xml layout, but it uses a hardcoded string, rather than a string resource.
If you modify the text attribute of this TextView to: #string/hello_world, you should be able to mirror the desired behavior that the book is asking for.
Here's a page straight out from the official Android docs on String resources. It may help you understand it better: https://developer.android.com/guide/topics/resources/string-resource.html
how to change my project name becouse I want it to Appare on mobile under the logo when its run the problem is I want to chane the name in to an Arabic name on android studio ?? it will not accapet
error massge invald pakage name :(
thank you
You will need to create a folder in the res/ folder with values-ar/ folder and create a string.xml in the value-ar/ folder and have the arabic names in this strings.xml file
You can refer to http://developer.android.com/guide/topics/resources/providing-resources.html
I created a wonderful app, but I want to rename the "application name" alone... (i.e the name seen by the user on the app icon ) .. ( this isn't package renaming)
How do I do it, without creating a new one ...
In the strings.xml file, there is an element app_name which is used in the AndroidManifest's application element as the app's name. Just change the value of app_name in the strings.xml file to change the name of your app.
You don't need to refactor to change the name that people see. That is set in your res->values->Strings.xml file. You can call it what you want.
you can try Refactor -> rename.
How to implement Android system l10n ?It has been l10n in German.What is different between Android and Linux in realizing system localization?
What is Operational process of implementing Android l10n ?
What is needed to implement Android system localization? such as Unicode UTF8, charset,other anything else?
Are you asking about internationalization/localization? If so there's a pretty extensive writeup in the docs.
Localization in Android is a native function, what you have to understand is how to "tell android" where to pick the words translated based on the Language that is set on the device that is running your application.
1. When developing an application for Android avoid "hardcoding" the string values and always use the strings.xml file located in the res/values folder. In that file enter every string used in your application using the tag:
<string name="app_title">Super App</string>
2. From the java side use this string resources from anywhere with the method getString(), this method receives as parameter the id of the item you want to get:
getString(R.string.app_title)
3. Once you have defined every string your app will use, just copy the strings.xml file and paste it in a new folder at the same level of the res/values folder but name it according to the new language you want to add (Read this)
4. Finally, translate every string in each folder to the proper language but keeping the same ids of every string, just changing its content:
res/values-EN/strings.xml
<string name="app_title">Best Application Ever!</string>
res/values-ES/strings.xml
<string name="app_title">La Mejor Aplicación!</string>
res/values-FR/strings.xml
<string name="app_title">Meilleure Application Jamais!</string>