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
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.
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.
Each time I create values_enu folder under res folder in eclipse for localization issue I get an error invalid resource directory name
http://developer.android.com/training/basics/supporting-devices/languages.html
Can someone help please.
One thing that wasn't clear to me from the docs is what a directory should be called in case of language variants, e.g. British/American English or German/Austrian German.
So even though the locales are of form en_GB, en_US, de_DE or de_AT etc, the corresponding folders should be called
res/values-en-rGB/
res/values-en-rUS/
res/values-de-rDE/
res/values-de-rAT/
That means keep the letter capitalization but use only hyphens instead of underscores and add an r before the language variant.
Use hyphen(-) instead of underscores(_)..
values-en is valid and values_en is invalid
You only should write "values-en".
The syntax is: FOLDERNAME MINUS 2-CHARACTER-LANGUAGE-KEY
Another example:
drawable-es <<= this will create a folder for Spanish picture files. It could be useful for implementing a labeled button you have created in photoshop or gimp.
Good morning. Into my android application I have in assets directory a file changelog. I have creato also the directory assets-it and I have put into the file changelog in italian language but when I start the application it always display the file into assets directory also if the device language is set to italian. Why ?
That is the expected behavior. Resources in res/ can be localized in that manner, but the assets/ directory cannot.
Since it's just a changelog, I'd recommend storing it as a localized string resource in res/values-LOCALE/. If you really want localization of assets, you could manually recreate it by getting the current locale and loading, e.g. assets/changelog-en, vs. assets/changelog-it, but I think that would generally not be a good idea, and it certainly isn't necessary in your case.
Try this:
put both changelog files into assets folder:
Path is for example: assets/en/changelog_file and assets/it/changelog_file
enter this into your values/strings.xml:
<string name="changelog_file">file:///android_asset/en/changelog_file</string>
put in your values-it/strings.xml:
<string name="changelog_file">file:///android_asset/it/changelog_file</string>
Like this you can call the string from the code:
getResources().getString(R.string.changelog_file) and it will call the values-en or values-it according to device locale.
This one puzzles me since my first android project. Consider multi-language string resources with 'en' as the default:
res/values/strings.xml <--- The default language 'en'
res/values-de/strings.xml <--- de
res/values-fr/strings.xml <--- fr
res/values-it/strings.xml <--- it
With that folder structure the Android Market entry for this app shows language support for "default, german, french and italian only". Yes, english is missing in that list.
Is it possible to "include" the complete default strings resource from the "values" folder in an additional "values-en" folder. And yes, I don't want to maintain that file in that new folder because everything is declared in the default string resource already.
Many thanks in advance.
Harald
I don't quite understand where the problem is. Just create a values-en directory and copy'n paste the XMLs from your default directory to the new one.
If you just want to have a kind of symbolic link to that default values directory so that when you change something inside the default directory the files i the linked directory represent the same changes then you just go to File -> New -> Folder select where the new folder should be created (in your case the res directory) and then hit on Advanced >> and there select Link to alternate location (Linked Folder) then browse to the directory you want to link to (in your case the values directory) and your done.
Now whenever you change something inside the values directory all your changes apply to the new linked directory.