Git Product home page Git Product logo

translator's People

Contributors

jonasraoni avatar mlocati avatar myigel avatar oscarotero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

translator's Issues

Awesome projects

Just wanted to drop a quick thank you for these awesome libraries. It saved me from the headache I got on Windows with setlocale.

How to use?

Sorry, I am unable to make this work, can you please tell me what I am doing wrong?

use Gettext\GettextTranslator;

$t = new GettextTranslator();
$t->setLanguage('de_DE');
$t->loadDomain('messages', ROOT . '/Locale');

echo $t->gettext('Welcome to wishthis');

/Locale/de_DE/LC_MESSAGES/messages.po (created with Poedit)

msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: 2022-03-21 09:58+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: Jay Trees <[email protected]>\n"
"Language-Team: \n"
"Language: de_DE\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.0.1\n"
"X-Poedit-Basepath: ../../../src\n"
"X-Poedit-KeywordsList: __\n"
"X-Poedit-SearchPath-0: .\n"

#: functions/gettext.php:13 pages/home.php:22
msgid "Welcome to wishthis"
msgstr "Willkommen zu wishthis"

home.php

<h2 class="ui header"><?= _('Welcome to wishthis') ?></h2>

What's wrong?

The text is not translated, the original is shown when I am expecting the German version.

add Support for PHP8

Like the gettext/gettext Repo in Version 5, this Repo also is configured as not supporting PHP8, meaining, you cant embed it currently in a Composer Project within PHP8, as ^7.2 does not support 8.0. Can this be changed? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.