But for your own stuff and packages, it might be better to add your own unique area to ensure it doesn't conflict with any other core language keys.
The reason why it returns [general_Button] is that it didn't find a key "Button" in area "general" - when you don't specify an area it will by default lookup in the area "general".
The localize directive and localizationService is looking for keys in either /App_Plugins/MyPackage/Lang/ .. or in core /Umbraco/Config/Lang/ folders..
I am not sure whether there is any Angular services to lookup dictionary items in settings section or you need to create your own.
But if you are developing a property editor or some stuff in a dashboard or a custom section, you should have a folder inside App_Plugins folder, e.g /App_Plugins/MyPackage/ .. inside that folder you can create a folder Lang with xml files for each language, da-DK.xml, en-GB.xml, en-US.xml etc.
If you use Umbraco 7.3.x+ you don't need to edit language keys in core language files in /umbraco/config/lang/..
Just add a language folder "lang" to your folder in AppPlugins.. And I think it must be located at root level in your plugin folder, so in "/AppPlugins/ADRIANO/"
Furthermore you should ensure that language files in this folder (in /App_Plugins/ADRIANO/lang/) is named like da-DK.xml, en-GB.xml and en-US.xml
I'm using Umbraco version 7.4.1 assembly: 1.0.5891.23238
I have read that link and I put the Lang folder (with my custom en-us.xml file) in
App_Plugin/ADRIANO
but the text of my button is always
[ADRIANO_Button]
I don't understand if I must declare it or include a directive to tell Umbraco that there is a custom language files or Umbraco should find automatically my custom language file and use it
Problems with localization in ng view
Hi to all, I have a problem with the localized key. In my ng view I use:
but when I see the page, It display the text "[general_Button]"
I have 2 languages (En-US and It-IT) and my dictionary item is inside a subcategory:
I tried also with:
as described into another forum, but the text displayed is [AreaSectionButton]
What's wrong?
Adriano
Hi Adriano
If you have added add key in language files under buttons, e.g.
then in your view you should refer to it this way:
Also be aware of the casing.
But for your own stuff and packages, it might be better to add your own unique area to ensure it doesn't conflict with any other core language keys.
The reason why it returns [general_Button] is that it didn't find a key "Button" in area "general" - when you don't specify an area it will by default lookup in the area "general".
/Bjarne
No I didn't added my button key in the language file. I create my custom keys in the dictionary (settings section).
Where I must add my custom area? Directly in the en.xml and it.xml files?
The
localize
directive andlocalizationService
is looking for keys in either/App_Plugins/MyPackage/Lang/
.. or in core/Umbraco/Config/Lang/
folders..I am not sure whether there is any Angular services to lookup dictionary items in settings section or you need to create your own.
But if you are developing a property editor or some stuff in a dashboard or a custom section, you should have a folder inside
App_Plugins
folder, e.g/App_Plugins/MyPackage/
.. inside that folder you can create a folderLang
with xml files for each language,da-DK.xml
,en-GB.xml
,en-US.xml
etc.For
en-US.xml
it could be similar to this:/Bjarne
It work like a charm!!! :-)
Thank you for your support.
Bye
Sorry, another one thing.
When I create my custom area and key into /Umbraco/Config/Lang/en.xml file, it function properly.
Now I want to create my custom Lang folder and I put inside my custom en.xml file
I put my custom Lang folder into my Package folder.
I tried to put the "Lang" folder in
and also in
but It don't function. Always the text of my button is
What's wrong?
If you use Umbraco 7.3.x+ you don't need to edit language keys in core language files in /umbraco/config/lang/..
Just add a language folder "lang" to your folder in AppPlugins.. And I think it must be located at root level in your plugin folder, so in "/AppPlugins/ADRIANO/"
Furthermore you should ensure that language files in this folder (in /App_Plugins/ADRIANO/lang/) is named like da-DK.xml, en-GB.xml and en-US.xml
In case anybody is curious, here is the documentation for what Bjarne is describing: https://our.umbraco.org/Documentation/Extending/Language-Files/Language-Files-For-Packages/
I'm using Umbraco version 7.4.1 assembly: 1.0.5891.23238
I have read that link and I put the Lang folder (with my custom en-us.xml file) in
but the text of my button is always
I don't understand if I must declare it or include a directive to tell Umbraco that there is a custom language files or Umbraco should find automatically my custom language file and use it
The content of my en-us.xml file is:
In my edit.html file I wrote
But the text of my button is always
[ADRIANO_Button]
:-(
Can you try these steps:
Ensure language files is located in
/App_Plugins/ADRIANO/Lang/
and is nameden-US.xml
(not sure if casing of this file name matter).Ensure you backoffice user is using English (United States) - default is English (United Kingdom).
When changing language for user it also seems it isn't enough just to refresh browser window - you have to logout and login again.
/Bjarne
OK...thanks Bjarne, I found the problem.
The name of my custom file must be the culture name
I called the files like the umbraco language file
Now...it works perfectly :-)
Thank you to all for support.
Bye
Great!
I am glad you solved the issue.
/Bjarne
is working on a reply...