Closed Serhioromano closed 4 years ago
Sure! Can provide a minimal repo so that I can work on this better? Thanks
https://github.com/joomla/joomla-cms
Go to folder language
and administrator\language
those are 2 i18n folders for backend and frontend. All extension's ini files are stored there.
In those folders first, you have older with language tags and inside that folder files. Every file starts with language tag and then you can identify the type of the file.
com* - component mod - module plg_ - plugin
But that is not as important.
@Serhioromano There is one more thing I may need your help.
The extension will read package.json
(for node) or pubspec.yaml
(for flutter) to check particular i18n packages exist or not. This makes it automatically adapt to different projects seamlessly.
I would like to know how to detect a project is a Joomla project and which packages make it supports i18n (or it has built-in support)
Thanks!
There is only one way to detect that site is Joomla. User might delete all extra files and only index.php
is not delitable. You can read its cotent and seatch for Joomla.Site
in 3d line of the file.
<?php
/**
* @package Joomla.Site
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
To get list of packages, you can read folders in /language
folder. Every package is and actualy a folder. For instance.
For tests you can download
German http://joomlacode.org/gf/download/frsrelease/21248/165208/de-DE_joomla_lang_full_3.9.9v1.zip Russian http://joomlacode.org/gf/download/frsrelease/21068/164869/ru-RU_joomla_lang_full_3.9.1v5.zip
Unpuk it. Then create folders language/de-DE
, administrator/language/de-DE
and same for ru-RU. Then unpak site.zip to language
folder and admin.zip to administrator/language
.
@Serhioromano Joomla is now supported in v1.8.0. 🎉 Please check it out! Hope I made everything right.
Oh! My goodness! I am on a way to check it. Wait for my review.
I do not see anything, How to use it? I do not see any pannels. And when I try any command I see errors.
The extension we be looking for composer.json at the root of your project and see if there is 'joomla/application' dependency exists.
Do you have it?
Ok, I've added this file. Now I see it. But it is a little bit confusing.
when I want to translate it insert all keys from all files into the current file. Is it possible that it keeps the structure. For instance if I want to translate to Russian from English, it creates similar files. If the language key was in language/en-GB/en-GB.com_contact.ini
then you create language/ru-RU/ru-RU.com_contact.ini
and instead of filling it empty you insert their English source text. Because it is impossible to translate by just looking to the language key. And it is impossible to search for every key just to look for content.
If the language key was in language/en-GB/en-GB.com_contact.ini then you create language/ru-RU/ru-RU.com_contact.ini
It's that the desired behavior?
instead of filling it empty you insert their English source text.
Sorry, I don't get it. Can you provide some example screenshots and steps to reproduce? Thanks.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Sorry I didn't got time to watch your video. I have just get back from my vacation. I can work on this now. Is the problem still presist?
I think so. I did not work with Joomla lately.
Is your feature related to a specific framework or general for this extension
Joomla
Describe the solution you'd like
I am a Joomla extension developer. Every Joomla extension can be translated. Locales are stored in
languages/en-GB/extension_name.ini
files. Very simple. In PHP code JText::_('KEY_TAG') is used for printing translations.That would be awesome to have this support.