What is a localization file?

A localization file, also referred to as a language file, contains all the text that is shown on your website or app, including the text that is shown on buttons, etc.
It is organized using the key-value-principle, where the keys replace your code.
In regards to our key-value-principle in your localization file, you have your code which, for example, contains a login button. The button could be named login.button. Your key would then be: “login.button” and its value would be “login”. The value describes what you see in the interface of your website or app. This specific example might look like this in your localization file: 

login.button = login

The key that you use in your localization file can have several values, though - one for each language you would like to translate it to. The key “login.button” can therefore have the value:

login.button = login 

in English, but the value:

login.button = anmelden

in German. 

Those different values can then appear on the website or app, once you change the language. The key is simply a name or placeholder for the actual content that appears in the interface. 

Why do I need a localization file?

To internationalize your app or website, you can take advantage of the key-value-principle. This means that depending on the language, the value of the keys contain different translations. You can see an example in the screenshot: 

How do I get or create a localization file?

A localization file can be any file which contains all your keys with the values in the source languages. See a list of our supported formats to check if you can use your file in its original format with Phrase.
If your developers already implemented the key-value-principle in your code, you can get the file directly from them.
Localization files can be created manually, but most likely they are exported from the code that your developers created. 

What does a localization file contain?

A localization file contains all keys and their corresponding values for that particular locale which exist in your app or website. Therefore, it usually only contains the values of your source language. 

Did this answer your question?