How to translate using translations editor in Android Studio? - android-studio

In my project, I have lots of string resources. Now that I am planning for release of my first ever app, I wanted to translate those to some widely used languages. However, I was unable to find the translate button there. This may seem dumb, but I am searching for it from an hour or so. I even have latest version of android studio installed. I gone through this docs and it was no help. Can someone please tell me how to translate strings using translations editor?

Well, in my case it does show a notification when I open strings.xml (res -> values -> strings.xml) saying: "Edit translations for all locales in the translations editor" and then, in the right, it has two options: "Open editor" which opens the translation editor in a new tab and "Hide notification" which hides that notification.
Now, I think if you can't see that you might have accidentally hidden that notification. If so, you can also open the translation editor by opening Project tab (left), then find your strings.xml file (res -> values -> strings.xml) and right-click on it. In my version (Chipmunk | 2021.2.1) the bottom option says Open Translations Editor. Click it and you're right in the translations editor! As for the question, it does seem a little dumb, but I understand you're a beginner (and I was one too some time ago), so there's no problem!
Hope it helps and your app succeeds!
Good luck! :)
The notification about the translation editor:

Related

Quickly translate strings in Android Studio

Android Studio has the "Translation Editor" built in, which is a very nice tool, but to quickly translate strings, the user interface is quite a hassle. I have to double-click an item to edit it, where I would expect an Enter or F2 keys to work as well.
Is there a shortcut to enter edit mode in the translation editor?
I'm not sure when it got changed, but for everyone (like me) who found this post here. The F2 now works to edit fields without using the mouse.

How can I use a right to left language in "Sublime Text" editor

I want to use some strings which are in my language (Persian) in "Sublime Text", but the editor does not show them correctly, for example:
it should be:
<title>عنوان صفحه</title>
but this is how sublime is showing it:
The encoding is set to utf-8.
What should I do to fix it?
There is This Plugin But It Does Not Work Properly
https://packagecontrol.io/packages/Bidirectional%20text%20support
added by barlop
Important Note- As comments indicate, this plugin doesn't really work. People have issues copy/pasting from sublime into notepad. It's OK for viewing but that's not much of an answer.
Note, sublime with this plugin might show leters in the correct order but copy/paste in notepad and it might not so try copy/pasting in notepad first before typing a whole load in there. Also this plugin might not move the cursor in a right to left fashion. (i.e. type a letter the cursor when typing in a right to left language should move to the left)
To install,
i've tested this on ST3 portable.
if you go to the tools menu you see there's no bidirectional option
Then if you go here
https://packagecontrol.io/packages/Bidirectional%20text%20support
see it mentions
their github page here
https://github.com/praveenvijayan/Sublime-Text-2-BIDI
Click on Clone/Download then download zip
extract it and Copy the folder to the packages folder.. i.e. open sublime, do preferences..browse packages , and it gives a folder like C:\Users\harvey\Downloads\ST3\Data\Packages Paste the folder there. (maybe it's better to put it in the user subdirectory, I don't know).
Then go to the tools menu and you see bidirectional options like bidirectional text that weren't there before
And while you're at it you may want to install "package control" if it's not already installed. Go to tools..command palette.. type 'package' see if package control appears. Or go to preferences, see if there is package control listed. If not then you don't have 'package control' installed. You can install package control by going to https://packagecontrol.io/ and click install and it gives you some python code in 2 tabs, one for ST2, one for ST3, and you can paste it into your console(view..console). But it's not strictly necessary you can install the bidirectional package without doing that.
The RTL-Mirror plugin for sublime 3 will show you the correct text by hitting Ctrl+F1 on Windows and OSX and Shift+F1 on Linux. it's not the perefect solution but it helps.
For the last few years my workflow has to been use VS Code as an IDE, for coding, and Sublime Text 3 (sorry, 4) for editing plain text because of its startup speed and because VS Code would be overkill.
However, since it's pretty clear by this point that the ST devs don't intend to implement RTL support, and because I would rather not have to install a third text editor just to deal with RTL text (which there are very few of anyway), there were only two convenient options left for me to open up RTL files on Windows.
Use Windows 10's Notepad (yes, really)
This is the superior solution since the new Notepad works well, starts up faster than Sublime, and not only renders RTL text but renders it quite well. The only downside is the lack of a dark mode.
Use VS Code (or whatever your preferred IDE is)
Both free IDEs like VS Code and paid ones like PHPStorm and IntelliJ seem to support RTL out of the box, but pretty much the only good reason to do this is if you absolutely need dark mode or are not on Windows - otherwise all of them up start up far slower than Sublime, and in the case of VS Code, render RTL text worse than Notepad does (I can't speak for JetStorm IDEs on that front).
Who knows, if I find a better alternative text editor that I can move my custom theme over to I may eventually move away from Sublime completely to another editor, but until then, sticking to two editors.

Where is the warnings screen option in Android Studio?

I want to see warnings of my code in Android Studio, But i am unable to find the option to display warnings view. In case of eclipse we can see the warnings in the "Problems" view.
Can anyone suggest me, how to view warnings in android studio?
If, on the toolbar, you click Analyze -> Inspect Code; then in the window that pops up select how much of your project you want to inspect (I usually do Whole Project, but you might want to select a specific module), then click okay.
Android Studio will work for a bit, then the inspection window will pop up from the bottom with a list of results, subdivided by inspection.
Build -> Make Project (Ctrl + F9) gives what we can get equivalent of Eclipse's “Problems” view on Android Studio
you can use F2 to next problems, see more here: Navigating to Next/Previous Error
GO to View-->Tool Windows-->Messages to view the warnings
Even i searched all the settings in Android Studio, but couldn't find a separate window for it.
The warnings are actually visible to the right end of a particular line as a small yellow marker and clicking on that show the warnings in the status bar below. The colors of them can be editted in the inspection options.
Hope this helps you.
The closest thing Android Studio/IntelliJ has to the Problems view in Eclipse is to use the Problems section of the Project tool window. With that open, navigate down to any classes that appear there and open them in the editor. Once in the editor, you can use F2 to jump between errors in the open file.
Unfortunately, IntelliJ's Problems tool window shows classes with errors nested by folder/package, so you have to expand several levels and it takes up a lot of screen real estate to see even one error. It also doesn't list the errors individually, forcing you to first open the problematic file and then use F2 to navigate to each one. I also had the problem that errors in files that weren't open, didn't show up there.
[opening warning screen in android studio
Click the warning icon as marked in the image.
Warning screen will open.
][click to see image] here

wysiwyg editor for aptana studio beginners

I am a new web designer. I have learned HTML5 and CSS3. However, I find it difficult to burst forward without a WYSIWYG editor.
I want to be able to type in the code I have learned, or carefully gathered, but I also want to be able to see it working, immediately, so that I can be assured that I am on the right track.
QUESTION: Is there a way for me to combine Aptana Studio (or Notepad++) with a WYSIWYG view, as I type in the code and build the new website?
Please help me. Thank you for your time.
Currently, no way to combine Aptana Studio(or Notepad++) has get WYSIWYG editor. But you can try the others free WYSIWYG editors to fulfill your desire. Below software may be very useful for you.
Nvu
Amaya
pagebreeze
BlueGriffon
Since this is a popular post:
As of Dec 2016, the most popular and useful solution seems to be Adobe Brackets.
It has the Live Preview feature, where you can see changes in browser immediately as you type.

How do I change the code page MS Visual Studio 2008 uses to open files?

I have a cpp file that uses ibm cp437 and Visual C++ keeps reading it with windows-1252. How do I make Visual C++ use the right code page for the file?
Alright, I figured it out myself. For the curious, here is the answer:
Right click the file in the Solution Explorer.
Select "Open With..."
Choose "C++ Source Code Editor (with encoding)"
A new box appears to specify Encoding. Choose "OEM United States - Codepage 437"
Done.
I also encountered these errors in my environments. I think there's any easier way to change the default code pages.
In windows 10, you could go to "Settings" -> "Region" -> "Administrative" tab -> "Language for non-Unicode programs". Then you could choose the region you want.
In this way, all the codes read from Visual Studio would use the code page whatever you want.
For example, the default setting for me is Chinese (Traditional, Taiwan). The code page is 950. But the codes are using windows-1252, therefore, I change the region to English (United States).
That's it.
Hope the solution could help you.
Thanks.
Unless you need the CP437 encoding, why don't you convert it to CP1252, UTF-8 or MS 'Unicode' (UCS-2)? Any reasonably capable editor should be able to do it.
VS2008 can do it - check out the Advanced Save option on the File menu.
Edit:
If you go to Source Control Explorer, right-click on the file, select 'Properties', you can set the encoding on the 'General' tab page. 'IBM437' is one of the choices.

Resources